diff --git a/composer.json b/composer.json index c5de76b..06be551 100644 --- a/composer.json +++ b/composer.json @@ -19,11 +19,14 @@ "cweagans/composer-patches": "^1.7", "drupal/admin_toolbar": "^3.4", "drupal/better_exposed_filters": "^7.0", + "drupal/ckeditor5_plugin_pack": "^1.2", "drupal/color_field": "^3.0", "drupal/config_split": "^2.0", "drupal/core-composer-scaffold": "^11", "drupal/core-project-message": "^11", "drupal/core-recommended": "^11", + "drupal/devel": "^5.3", + "drupal/easy_breadcrumb": "^2.0", "drupal/entity_clone": "^2.1@beta", "drupal/entity_hierarchy": "^3.3", "drupal/field_group": "^3.4", @@ -50,6 +53,7 @@ "drupal/workflow": "^1.8", "drush/drush": "^13", "mglaman/composer-drupal-lenient": "^1.0", + "symfony/http-client": "^6.4", "symfony/process": "^7.1", "weitzman/drupal-test-traits": "^2.5" }, diff --git a/composer.lock b/composer.lock index 5e5d0fb..2b00f93 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a69ae602dcd0a11e9813dd2e7ec9caa8", + "content-hash": "ef10ebd7318f2a38105ecd9ee48d84fd", "packages": [ { "name": "asm89/stack-cors", @@ -62,6 +62,219 @@ }, "time": "2023-11-14T13:51:46+00:00" }, + { + "name": "aws/aws-crt-php", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/d71d9906c7bb63a28295447ba12e74723bd3730e", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35||^5.6.3||^9.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality." + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "https://github.com/awslabs/aws-crt-php", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.7" + }, + "time": "2024-10-18T22:15:13+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.339.4", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "ea62ad03645ef7a1d3f1cda2de49f0869de3c582" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/ea62ad03645ef7a1d3f1cda2de49f0869de3c582", + "reference": "ea62ad03645ef7a1d3f1cda2de49f0869de3c582", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.2.3", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/promises": "^2.0", + "guzzlehttp/psr7": "^2.4.5", + "mtdowling/jmespath.php": "^2.8.0", + "php": ">=8.1", + "psr/http-message": "^2.0" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "composer/composer": "^2.7.8", + "dms/phpunit-arraysubset-asserts": "^0.4.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "paragonie/random_compat": ">= 2", + "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", + "psr/cache": "^2.0 || ^3.0", + "psr/simple-cache": "^2.0 || ^3.0", + "sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0", + "symfony/filesystem": "^v6.4.0 || ^v7.1.0", + "yoast/phpunit-polyfills": "^2.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Aws\\": "src/" + }, + "exclude-from-classmap": [ + "src/data/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "support": { + "forum": "https://github.com/aws/aws-sdk-php/discussions", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.339.4" + }, + "time": "2025-01-31T19:04:39+00:00" + }, + { + "name": "caxy/php-htmldiff", + "version": "v0.1.16", + "source": { + "type": "git", + "url": "https://github.com/caxy/php-htmldiff.git", + "reference": "5c580b4f09285c078f0c5cb261573412a736a8cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/caxy/php-htmldiff/zipball/5c580b4f09285c078f0c5cb261573412a736a8cb", + "reference": "5c580b4f09285c078f0c5cb261573412a736a8cb", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "ezyang/htmlpurifier": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "doctrine/cache": "~1.0", + "phpunit/phpunit": "~9.0" + }, + "suggest": { + "doctrine/cache": "Used for caching the calculated diffs using a Doctrine Cache Provider" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Caxy\\HtmlDiff": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "authors": [ + { + "name": "Josh Schroeder", + "email": "jschroeder@caxy.com", + "homepage": "http://www.caxy.com" + } + ], + "description": "A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.", + "homepage": "https://github.com/caxy/php-htmldiff", + "keywords": [ + "diff", + "html" + ], + "support": { + "issues": "https://github.com/caxy/php-htmldiff/issues", + "source": "https://github.com/caxy/php-htmldiff/tree/v0.1.16" + }, + "time": "2025-01-22T17:03:45+00:00" + }, { "name": "chi-teck/drupal-code-generator", "version": "4.1.0", @@ -1152,6 +1365,97 @@ ], "time": "2022-05-20T20:07:39+00:00" }, + { + "name": "doctrine/common", + "version": "3.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "d9ea4a54ca2586db781f0265d36bea731ac66ec5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/d9ea4a54ca2586db781f0265d36bea731ac66ec5", + "reference": "d9ea4a54ca2586db781f0265d36bea731ac66ec5", + "shasum": "" + }, + "require": { + "doctrine/persistence": "^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0 || ^10.0", + "doctrine/collections": "^1", + "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^6.1", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/common/issues", + "source": "https://github.com/doctrine/common/tree/3.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", + "type": "tidelift" + } + ], + "time": "2025-01-01T22:12:03+00:00" + }, { "name": "doctrine/dbal", "version": "3.9.3", @@ -1479,6 +1783,101 @@ ], "time": "2024-02-05T11:35:39+00:00" }, + { + "name": "doctrine/persistence", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "45004aca79189474f113cbe3a53847c2115a55fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/45004aca79189474f113cbe3a53847c2115a55fa", + "reference": "45004aca79189474f113cbe3a53847c2115a55fa", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1 || ^2", + "php": "^8.1", + "psr/cache": "^1.0 || ^2.0 || ^3.0" + }, + "conflict": { + "doctrine/common": "<2.10" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "1.12.7", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^9.6", + "symfony/cache": "^4.4 || ^5.4 || ^6.0 || ^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Persistence\\": "src/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/persistence/issues", + "source": "https://github.com/doctrine/persistence/tree/4.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fpersistence", + "type": "tidelift" + } + ], + "time": "2024-11-01T21:49:07+00:00" + }, { "name": "drupal/admin_toolbar", "version": "3.5.1", @@ -1637,6 +2036,128 @@ "issues": "https://www.drupal.org/project/issues/better_exposed_filters" } }, + { + "name": "drupal/ckeditor5_plugin_pack", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/ckeditor5_plugin_pack.git", + "reference": "1.2.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/ckeditor5_plugin_pack-1.2.4.zip", + "reference": "1.2.4", + "shasum": "cb97534127935b3286244c17b14c84bada36ef05" + }, + "require": { + "drupal/ckeditor5_premium_features": "^1.3", + "drupal/core": "^9.4 || ^10.0 || ^11.0", + "php": "^8.0" + }, + "require-dev": { + "drupal/ckeditor5_premium_features_wproofreader": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "1.2.4", + "datestamp": "1734514948", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Wojciech Kukowski (salmonek)", + "homepage": "https://www.drupal.org/u/salmonek", + "role": "Maintainer" + }, + { + "name": "Dawid Olszewski (dolszewski)", + "homepage": "https://www.drupal.org/u/dolszewski", + "role": "Maintainer" + } + ], + "description": "The plugin pack for the CKEditor 5 WYSIWYG editor.", + "homepage": "https://www.drupal.org/project/ckeditor5_plugin_pack", + "support": { + "source": "https://git.drupalcode.org/project/ckeditor5_plugin_pack", + "issues": "https://www.drupal.org/project/issues/ckeditor5_plugin_pack" + } + }, + { + "name": "drupal/ckeditor5_premium_features", + "version": "1.3.5", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/ckeditor5_premium_features.git", + "reference": "1.3.5" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/ckeditor5_premium_features-1.3.5.zip", + "reference": "1.3.5", + "shasum": "e889e52c4bf5564c1c1aab4ee2a92fd775b912b3" + }, + "require": { + "aws/aws-sdk-php": "^3.296", + "caxy/php-htmldiff": "~0.1.14", + "drupal/core": "^9.3 || ^10.0 || ^11.0", + "ext-dom": "*", + "ext-libxml": "*", + "firebase/php-jwt": "^6.0", + "openai-php/client": "^0.4.0 || ^0.10.0", + "php": "^8.0" + }, + "require-dev": { + "drupal/ckeditor5-ckeditor5": "*", + "drupal/ckeditor5_premium_features_mentions": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "1.3.5", + "datestamp": "1734515151", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Wojciech Kukowski (salmonek)", + "homepage": "https://www.drupal.org/u/salmonek", + "role": "Maintainer" + }, + { + "name": "Dawid Olszewski (dolszewski)", + "homepage": "https://www.drupal.org/u/dolszewski", + "role": "Maintainer" + }, + { + "name": "wwalc", + "homepage": "https://www.drupal.org/user/184556" + } + ], + "description": "The premium features for the CKEditor 5 WYSIWYG editor.", + "homepage": "https://www.drupal.org/project/ckeditor5_premium_features", + "support": { + "source": "https://git.drupalcode.org/project/ckeditor5_premium_features", + "issues": "https://www.drupal.org/project/issues/ckeditor5_premium_features" + } + }, { "name": "drupal/color_field", "version": "3.0.1", @@ -2261,6 +2782,163 @@ "source": "https://git.drupalcode.org/project/dbal" } }, + { + "name": "drupal/devel", + "version": "5.3.1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/devel.git", + "reference": "5.3.1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/devel-5.3.1.zip", + "reference": "5.3.1", + "shasum": "6a5f13bdf93dc5f7f194b6af847589ae15e37b63" + }, + "require": { + "doctrine/common": "^2.7 || ^3.4", + "drupal/core": "^10.3 || ^11 || ^12", + "php": ">=8.1", + "symfony/var-dumper": "^4 || ^5 || ^6 || ^7" + }, + "conflict": { + "drupal/core": "<10.3", + "drush/drush": "<12.5.1", + "kint-php/kint": "<3" + }, + "require-dev": { + "drush/drush": "^13", + "firephp/firephp-core": "^0.5.3", + "kint-php/kint": "^5.1" + }, + "suggest": { + "kint-php/kint": "Kint provides an informative display of arrays/objects. Useful for debugging and developing." + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "5.3.1", + "datestamp": "1723258446", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "moshe weitzman", + "homepage": "https://www.drupal.org/user/23" + } + ], + "description": "Various blocks, pages, and functions for developers.", + "homepage": "https://www.drupal.org/project/devel", + "support": { + "source": "https://gitlab.com/drupalspoons/devel", + "issues": "https://gitlab.com/drupalspoons/devel/-/issues", + "slack": "https://drupal.slack.com/archives/C012WAW1MH6" + } + }, + { + "name": "drupal/easy_breadcrumb", + "version": "2.0.9", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/easy_breadcrumb.git", + "reference": "2.0.9" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/easy_breadcrumb-2.0.9.zip", + "reference": "2.0.9", + "shasum": "9e7c33e2ec0637d37d509776795a476f2f2d9bb8" + }, + "require": { + "drupal/core": "^9.2 || ^10 || ^11" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.9", + "datestamp": "1732752214", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Neslee Canil Pinto", + "homepage": "https://www.drupal.org/u/neslee-canil-pinto", + "role": "Maintainer" + }, + { + "name": "Greg Boggs", + "homepage": "https://www.drupal.org/u/greg-boggs", + "role": "Maintainer" + }, + { + "name": "diamondsea", + "homepage": "https://www.drupal.org/user/430714" + }, + { + "name": "greg boggs", + "homepage": "https://www.drupal.org/user/153069" + }, + { + "name": "hmartens", + "homepage": "https://www.drupal.org/user/622826" + }, + { + "name": "loopduplicate", + "homepage": "https://www.drupal.org/user/717290" + }, + { + "name": "neslee canil pinto", + "homepage": "https://www.drupal.org/user/3580850" + }, + { + "name": "nickdickinsonwilde", + "homepage": "https://www.drupal.org/user/3094661" + }, + { + "name": "rakesh.gectcr", + "homepage": "https://www.drupal.org/user/1177822" + }, + { + "name": "renatog", + "homepage": "https://www.drupal.org/user/3326031" + }, + { + "name": "sonemonu", + "homepage": "https://www.drupal.org/user/1667988" + }, + { + "name": "spuky", + "homepage": "https://www.drupal.org/user/209353" + }, + { + "name": "tatarbj", + "homepage": "https://www.drupal.org/user/649590" + } + ], + "description": "Adds configuration to the system breadcrumbs.", + "homepage": "https://www.drupal.org/project/easy_breadcrumb", + "support": { + "source": "https://git.drupalcode.org/project/easy_breadcrumb", + "issues": "https://www.drupal.org/project/issues/easy_breadcrumb" + } + }, { "name": "drupal/entity_clone", "version": "2.1.0-beta1", @@ -4269,6 +4947,130 @@ ], "time": "2024-12-27T00:36:43+00:00" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.18.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" + }, + "time": "2024-11-01T03:51:45+00:00" + }, + { + "name": "firebase/php-jwt", + "version": "v6.11.0", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" + }, + "time": "2025-01-23T05:11:06+00:00" + }, { "name": "grasmash/expander", "version": "3.0.1", @@ -5315,6 +6117,72 @@ ], "time": "2024-11-19T15:26:05+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "files": [ + "src/JmesPath.php" + ], + "psr-4": { + "JmesPath\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0" + }, + "time": "2024-09-04T18:46:31+00:00" + }, { "name": "nikic/php-parser", "version": "v5.4.0", @@ -5373,6 +6241,97 @@ }, "time": "2024-12-30T11:07:19+00:00" }, + { + "name": "openai-php/client", + "version": "v0.10.3", + "source": { + "type": "git", + "url": "https://github.com/openai-php/client.git", + "reference": "4a565d145e0fb3ea1baba8fffe39d86c56b6dc2c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openai-php/client/zipball/4a565d145e0fb3ea1baba8fffe39d86c56b6dc2c", + "reference": "4a565d145e0fb3ea1baba8fffe39d86c56b6dc2c", + "shasum": "" + }, + "require": { + "php": "^8.1.0", + "php-http/discovery": "^1.20.0", + "php-http/multipart-stream-builder": "^1.4.2", + "psr/http-client": "^1.0.3", + "psr/http-client-implementation": "^1.0.1", + "psr/http-factory-implementation": "*", + "psr/http-message": "^1.1.0|^2.0.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.9.2", + "guzzlehttp/psr7": "^2.7.0", + "laravel/pint": "^1.18.1", + "mockery/mockery": "^1.6.12", + "nunomaduro/collision": "^7.11.0|^8.5.0", + "pestphp/pest": "^2.36.0|^3.5.0", + "pestphp/pest-plugin-arch": "^2.7|^3.0", + "pestphp/pest-plugin-type-coverage": "^2.8.7|^3.1.0", + "phpstan/phpstan": "^1.12.7", + "symfony/var-dumper": "^6.4.11|^7.1.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/OpenAI.php" + ], + "psr-4": { + "OpenAI\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + }, + { + "name": "Sandro Gehri" + } + ], + "description": "OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API", + "keywords": [ + "GPT-3", + "api", + "client", + "codex", + "dall-e", + "language", + "natural", + "openai", + "php", + "processing", + "sdk" + ], + "support": { + "issues": "https://github.com/openai-php/client/issues", + "source": "https://github.com/openai-php/client/tree/v0.10.3" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/gehrisandro", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + } + ], + "time": "2024-11-12T20:51:16+00:00" + }, { "name": "pear/archive_tar", "version": "1.5.0", @@ -5706,6 +6665,141 @@ }, "time": "2024-10-03T13:43:19+00:00" }, + { + "name": "php-http/discovery", + "version": "1.20.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d", + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", + "sebastian/comparator": "^3.0.5 || ^4.0.8", + "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1" + }, + "type": "composer-plugin", + "extra": { + "class": "Http\\Discovery\\Composer\\Plugin", + "plugin-optional": true + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr17", + "psr7" + ], + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.20.0" + }, + "time": "2024-10-02T11:20:13+00:00" + }, + { + "name": "php-http/multipart-stream-builder", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/php-http/multipart-stream-builder.git", + "reference": "10086e6de6f53489cca5ecc45b6f468604d3460e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/10086e6de6f53489cca5ecc45b6f468604d3460e", + "reference": "10086e6de6f53489cca5ecc45b6f468604d3460e", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/discovery": "^1.15", + "psr/http-factory-implementation": "^1.0" + }, + "require-dev": { + "nyholm/psr7": "^1.0", + "php-http/message": "^1.5", + "php-http/message-factory": "^1.0.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Http\\Message\\MultipartStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + } + ], + "description": "A builder class that help you create a multipart stream", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "multipart stream", + "stream" + ], + "support": { + "issues": "https://github.com/php-http/multipart-stream-builder/issues", + "source": "https://github.com/php-http/multipart-stream-builder/tree/1.4.2" + }, + "time": "2024-09-04T13:22:54+00:00" + }, { "name": "phpmailer/phpmailer", "version": "v6.9.3", @@ -7201,6 +8295,177 @@ ], "time": "2024-12-30T18:59:46+00:00" }, + { + "name": "symfony/http-client", + "version": "v6.4.17", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client.git", + "reference": "88898d842eb29d7e1a903724c94e90a6ca9c0509" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client/zipball/88898d842eb29d7e1a903724c94e90a6ca9c0509", + "reference": "88898d842eb29d7e1a903724c94e90a6ca9c0509", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-client-contracts": "~3.4.4|^3.5.2", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "php-http/discovery": "<1.15", + "symfony/http-foundation": "<6.3" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" + }, + "require-dev": { + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4|^2.0", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", + "homepage": "https://symfony.com", + "keywords": [ + "http" + ], + "support": { + "source": "https://github.com/symfony/http-client/tree/v6.4.17" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-18T12:18:31+00:00" + }, + { + "name": "symfony/http-client-contracts", + "version": "v3.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645", + "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-07T08:49:48+00:00" + }, { "name": "symfony/http-foundation", "version": "v7.1.10", @@ -11958,85 +13223,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "php-http/discovery", - "version": "1.20.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d", - "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0|^2.0", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "nyholm/psr7": "<1.0", - "zendframework/zend-diactoros": "*" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "*", - "psr/http-factory-implementation": "*", - "psr/http-message-implementation": "*" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "graham-campbell/phpspec-skip-example-extension": "^5.0", - "php-http/httplug": "^1.0 || ^2.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", - "sebastian/comparator": "^3.0.5 || ^4.0.8", - "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1" - }, - "type": "composer-plugin", - "extra": { - "class": "Http\\Discovery\\Composer\\Plugin", - "plugin-optional": true - }, - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - }, - "exclude-from-classmap": [ - "src/Composer/Plugin.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", - "homepage": "http://php-http.org", - "keywords": [ - "adapter", - "client", - "discovery", - "factory", - "http", - "message", - "psr17", - "psr7" - ], - "support": { - "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.20.0" - }, - "time": "2024-10-02T11:20:13+00:00" - }, { "name": "php-http/guzzle7-adapter", "version": "1.1.0", @@ -15054,177 +16240,6 @@ ], "time": "2024-11-13T16:15:23+00:00" }, - { - "name": "symfony/http-client", - "version": "v6.4.17", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "88898d842eb29d7e1a903724c94e90a6ca9c0509" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/88898d842eb29d7e1a903724c94e90a6ca9c0509", - "reference": "88898d842eb29d7e1a903724c94e90a6ca9c0509", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "~3.4.4|^3.5.2", - "symfony/service-contracts": "^2.5|^3" - }, - "conflict": { - "php-http/discovery": "<1.15", - "symfony/http-foundation": "<6.3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "3.0" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4|^2.0", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "keywords": [ - "http" - ], - "support": { - "source": "https://github.com/symfony/http-client/tree/v6.4.17" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-12-18T12:18:31+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v3.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645", - "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-12-07T08:49:48+00:00" - }, { "name": "symfony/lock", "version": "v7.2.0", diff --git a/web/modules/custom/content_block_preview/assets/preview-white.svg b/web/modules/custom/content_block_preview/assets/preview-white.svg new file mode 100644 index 0000000..0cf9394 --- /dev/null +++ b/web/modules/custom/content_block_preview/assets/preview-white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/modules/custom/content_block_preview/assets/preview.svg b/web/modules/custom/content_block_preview/assets/preview.svg new file mode 100644 index 0000000..89a09f4 --- /dev/null +++ b/web/modules/custom/content_block_preview/assets/preview.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/modules/custom/content_block_preview/content_block_preview.info.yml b/web/modules/custom/content_block_preview/content_block_preview.info.yml new file mode 100644 index 0000000..4d47b4d --- /dev/null +++ b/web/modules/custom/content_block_preview/content_block_preview.info.yml @@ -0,0 +1,5 @@ +name: Block Content Preview +description: 'Allows loading of preview images for inline blocks.' +core_version_requirement: ^10 || ^11 +type: module +package: Layout Builder diff --git a/web/modules/custom/content_block_preview/content_block_preview.libraries.yml b/web/modules/custom/content_block_preview/content_block_preview.libraries.yml new file mode 100644 index 0000000..7ad095a --- /dev/null +++ b/web/modules/custom/content_block_preview/content_block_preview.libraries.yml @@ -0,0 +1,11 @@ +assets: + css: + theme: + css/block-content-preview.css: {} + js: + js/contentBlockPreview.js: { defer: true } + dependencies: + - core/jquery + - core/once + - core/drupal + diff --git a/web/modules/custom/content_block_preview/content_block_preview.module b/web/modules/custom/content_block_preview/content_block_preview.module new file mode 100644 index 0000000..fbe44b3 --- /dev/null +++ b/web/modules/custom/content_block_preview/content_block_preview.module @@ -0,0 +1,11 @@ + { + console.log("hello"); + }); + } + }; +})(Drupal, once); diff --git a/web/modules/custom/dc_core/dc_core.module b/web/modules/custom/dc_core/dc_core.module index bb09e28..8a831ce 100644 --- a/web/modules/custom/dc_core/dc_core.module +++ b/web/modules/custom/dc_core/dc_core.module @@ -1,5 +1,7 @@ isAdminRoute()) { $attachments['#attached']['library'][] = 'dc_core/admin_overrides'; @@ -8,3 +10,30 @@ function dc_core_page_attachments(array &$attachments) { $attachments['#attached']['library'][] = 'dc_core/admin_overrides'; } } + +function dc_core_views_pre_view(ViewExecutable $view) { + if ($view->id() !== 'floorplans_by_property') { + return; + } + $cur_node = \Drupal::routeMatch()->getParameter('node'); + if (!$cur_node instanceof \Drupal\node\NodeInterface) { + return; + } + if (!$cur_node->hasField('field_property')) { + return; + } + // current property. + $property = $cur_node->get('field_property')->first()->getValue()['target_id'] ?? FALSE; + assert(!is_null($property)); + + $increased_price_data = [ + + ]; + $exposed_input = $view->getExposedInput(); + if (isset($exposed_input['field_price_value'])) { + $filters = $view->display_handler->getOption('filters'); + $filters['field_price_value']['group_info']['group_items'][3]['title'] = "339+"; + $filters['field_price_value']['group_info']['group_items'][3]['value']['value'] = 339; + $view->display_handler->overrideOption('filters', $filters); + } +} diff --git a/web/modules/custom/dc_core/dc_core.routing.yml b/web/modules/custom/dc_core/dc_core.routing.yml new file mode 100644 index 0000000..6796af4 --- /dev/null +++ b/web/modules/custom/dc_core/dc_core.routing.yml @@ -0,0 +1,7 @@ +dc_core.lotr_characters: + path: '/api/character-list' + defaults: + _controller: '\Drupal\dc_core\Controller\LotrCharacters::characterJson' + _title: 'LOTR | Characters' + requirements: + _permission: 'access content' diff --git a/web/modules/custom/dc_core/drush.services.yml b/web/modules/custom/dc_core/drush.services.yml new file mode 100644 index 0000000..50981ab --- /dev/null +++ b/web/modules/custom/dc_core/drush.services.yml @@ -0,0 +1,5 @@ +services: + dc_core.commands: + class: \Drupal\dc_core\Drush\Commands\CharacterImport + tags: + - { name: drush.command } diff --git a/web/modules/custom/dc_core/src/Attributes/LotrCharacterList.php b/web/modules/custom/dc_core/src/Attributes/LotrCharacterList.php new file mode 100644 index 0000000..308d2fd --- /dev/null +++ b/web/modules/custom/dc_core/src/Attributes/LotrCharacterList.php @@ -0,0 +1,420 @@ +getCharacterJson(); + foreach ($characters as $index => $character) { + $rand = rand(0,2); + if ($rand == 1) { + $characters[$index]['last_modified'] = time(); + } + else { + $characters[$index]['last_modified'] = 0; + } + } + $this->characterList = $characters; + } + + protected function getCharacterJson(): array { + $characters = [ + [ + 'name' => 'Frodo Baggins', + 'species' => 'Hobbit', + 'height' => '3\'6" (1.07m)', + 'hair' => 'Brown', + 'eyes' => 'Blue', + 'birth' => '2968 of the Third Age', + 'death' => 'Unknown, last seen leaving Middle-earth', + 'title' => 'Ring-bearer', + 'occupation' => 'Adventurer', + 'affiliation' => 'The Fellowship of the Ring', + 'bio' => 'Frodo Baggins was a Hobbit of the Shire who was entrusted with the One Ring by his uncle, Bilbo. A reluctant hero, he embarked on a perilous journey to destroy the Ring in the fires of Mount Doom. His quest was fraught with challenges, from the deceptive Gollum to the looming threat of Sauron’s forces. Despite his bravery, the burden of the Ring ultimately took its toll on him, leading to his eventual departure from Middle-earth.', + 'image_url' => 'https://platform.polygon.com/wp-content/uploads/sites/2/chorus/uploads/chorus_asset/file/22263166/lotr3_movie_screencaps.com_10384.jpg', + 'youtube_url' => 'https://www.youtube.com/embed/1Hd-ULcdNN0' + ], + [ + 'name' => 'Aragorn', + 'species' => 'Human', + 'height' => '6\'6" (1.98m)', + 'hair' => 'Dark brown', + 'eyes' => 'Grey', + 'birth' => '2931 of the Third Age', + 'death' => '120 of the Fourth Age', + 'title' => 'King Elessar', + 'occupation' => 'Ranger, King', + 'affiliation' => 'The Fellowship of the Ring, Kingdom of Gondor', + 'bio' => 'Aragorn, son of Arathorn, was the heir to the throne of Gondor. He lived much of his life as a ranger, known as Strider, before stepping into his destiny as the leader of the forces against Sauron. A skilled warrior and tracker, he was instrumental in the success of the Fellowship and played a key role in uniting the Free Peoples of Middle-earth against the Dark Lord. After the defeat of Sauron, Aragorn ascended to the throne of Gondor and ruled with wisdom and strength.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/5/53/Aragorn_1.png/revision/latest/scale-to-width-down/350?cb=20190520050210', + 'youtube_url' => 'https://www.youtube.com/watch?v=Qx62l9Pa2uI' + ], + [ + 'name' => 'Gandalf', + 'species' => 'Maia (Spirit)', + 'height' => '5\'6" (1.68m)', + 'hair' => 'Grey, White later', + 'eyes' => 'Grey', + 'birth' => 'Uncertain, an ancient Maia spirit', + 'death' => 'Deceased, but returned as Gandalf the White', + 'title' => 'Gandalf the Grey', + 'occupation' => 'Wizard', + 'affiliation' => 'The Fellowship of the Ring', + 'bio' => 'Gandalf is one of the five Istari sent by the Valar to aid the Free Peoples of Middle-earth. He is a wise and powerful wizard, often serving as a counselor and guiding force in key moments of the War of the Ring. Gandalf helped organize the Fellowship and played a central role in defeating Sauron’s forces. After falling in battle with the Balrog, Gandalf was resurrected as Gandalf the White, more powerful than before. His wisdom, courage, and leadership were vital in the defeat of Sauron.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/a/a6/Gandalf_the_Grey.png/revision/latest/scale-to-width-down/350?cb=20200814044030', + 'youtube_url' => 'https://www.youtube.com/watch?v=eYhwdf41gMI' + ], + [ + 'name' => 'Legolas', + 'species' => 'Elf', + 'height' => '6\'1" (1.85m)', + 'hair' => 'Blonde', + 'eyes' => 'Blue', + 'birth' => 'Unknown, during the First Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'Prince of Mirkwood', + 'occupation' => 'Archer, Prince', + 'affiliation' => 'The Fellowship of the Ring, Mirkwood Elves', + 'bio' => 'Legolas is an Elven prince from Mirkwood and one of the members of the Fellowship of the Ring. His remarkable skills with a bow and arrow were invaluable in battle, and his keen senses allowed him to spot danger before it struck. Along with Gimli, Legolas formed a deep friendship despite the ancient animosity between Elves and Dwarves. He was also instrumental in the battle against Sauron’s forces, and after the War of the Ring, he sailed west to the Undying Lands.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/4/4a/Legolas_The_Lord_of_the_Rings_Animated.png/revision/latest/scale-to-width-down/350?cb=20190917132524', + 'youtube_url' => 'https://www.youtube.com/watch?v=xwFZ0osEjfY' + ], + [ + 'name' => 'Gimli', + 'species' => 'Dwarf', + 'height' => '4\'4" (1.32m)', + 'hair' => 'Red', + 'eyes' => 'Brown', + 'birth' => '2879 of the Third Age', + 'death' => 'Unknown, possibly still alive in the Fourth Age', + 'title' => 'Son of Glóin', + 'occupation' => 'Warrior', + 'affiliation' => 'The Fellowship of the Ring', + 'bio' => 'Gimli, son of Glóin, was a Dwarf warrior from Erebor who joined the Fellowship to aid in the destruction of the One Ring. Known for his strength and bravery, Gimli’s friendship with Legolas grew throughout their journey, symbolizing the union between Elves and Dwarves. He played a key role in several battles, including the Battle of Helm’s Deep and the Battle of the Pelennor Fields. After the War of the Ring, Gimli became a leader of Dwarves and visited the Glittering Caves of Helm’s Deep.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/a/a2/Gimli.png/revision/latest/scale-to-width-down/350?cb=20190617045757', + 'youtube_url' => 'https://www.youtube.com/watch?v=H7ti80IzTME' + ], + [ + 'name' => 'Samwise Gamgee', + 'species' => 'Hobbit', + 'height' => '3\'6" (1.07m)', + 'hair' => 'Brown', + 'eyes' => 'Brown', + 'birth' => '2980 of the Third Age', + 'death' => 'Unknown, last seen leaving Middle-earth', + 'title' => 'Gardener, Ring-bearer', + 'occupation' => 'Gardener, Adventurer', + 'affiliation' => 'The Fellowship of the Ring', + 'bio' => 'Samwise Gamgee was Frodo Baggins’ loyal gardener and friend. Though initially seen as a simple Hobbit, Sam proved to be one of the most steadfast and courageous members of the Fellowship. He played a crucial role in helping Frodo destroy the One Ring, even carrying him at times when Frodo could go no further. Sam’s loyalty and friendship were essential in the success of the quest, and he eventually returned to the Shire to live a full life before sailing to the Undying Lands.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/d/d6/Samwise_Gamgee_animated.png/revision/latest/scale-to-width-down/350?cb=20181217044906', + 'youtube_url' => 'https://www.youtube.com/watch?v=1Nx3zRx7pHk' + ], + [ + 'name' => 'Boromir', + 'species' => 'Human', + 'height' => '6\'1" (1.85m)', + 'hair' => 'Brown', + 'eyes' => 'Grey', + 'birth' => '2978 of the Third Age', + 'death' => '3019 of the Third Age (Killed by Orcs)', + 'title' => 'Captain of Gondor', + 'occupation' => 'Soldier', + 'affiliation' => 'The Fellowship of the Ring', + 'bio' => 'Boromir was the eldest son of Denethor, the Steward of Gondor. A brave and noble warrior, Boromir was chosen to be part of the Fellowship of the Ring. However, his desire to use the Ring to save Gondor led to his tragic fall. In the end, he redeemed himself by defending Merry and Pippin from the attacking Uruk-hai, dying heroically. His death marked one of the most poignant moments of the War of the Ring.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/6/69/Boromir.png/revision/latest/scale-to-width-down/350?cb=20190602141523', + 'youtube_url' => 'https://www.youtube.com/watch?v=0fvUzz56N0E' + ], + [ + 'name' => 'Galadriel', + 'species' => 'Elf', + 'height' => '5\'11" (1.80m)', + 'hair' => 'Blonde', + 'eyes' => 'Grey', + 'birth' => 'Uncertain, during the Years of the Trees', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'Lady of Lothlórien', + 'occupation' => 'Queen, Ruler of Lothlórien', + 'affiliation' => 'The Free Peoples of Middle-earth', + 'bio' => 'Galadriel is one of the oldest and most powerful Elves in Middle-earth. A member of the royal house of the Noldor, she ruled over the realm of Lothlórien with her husband Celeborn. Galadriel’s wisdom, beauty, and grace were unmatched, and she played a vital role in aiding the Fellowship, providing them with gifts and counsel. Her Elven ring, Nenya, helped preserve the beauty of Lothlórien. After the defeat of Sauron, Galadriel sailed to the Undying Lands.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/d/d1/Galadriel.png/revision/latest/scale-to-width-down/350?cb=20200118073639', + 'youtube_url' => 'https://www.youtube.com/watch?v=nHzEFdqT27Q' + ], + [ + 'name' => 'Saruman', + 'species' => 'Maia (Spirit)', + 'height' => '5\'8" (1.73m)', + 'hair' => 'White, later Grey', + 'eyes' => 'Grey', + 'birth' => 'Uncertain, ancient Maia spirit', + 'death' => 'Fell in 3019 of the Third Age', + 'title' => 'Saruman the White', + 'occupation' => 'Wizard, Leader of Isengard', + 'affiliation' => 'Previously the White Council, later Sauron', + 'bio' => 'Saruman was one of the five Istari sent to Middle-earth to help oppose Sauron. Initially the head of the White Council and the most powerful of the wizards, he became corrupted by his desire for power. Saruman sought to gain control over the One Ring and betrayed the Free Peoples of Middle-earth, forging an alliance with Sauron. His quest for domination led to his downfall when his forces were defeated at Helm’s Deep and his fortress of Isengard was destroyed. Saruman’s ambition ultimately led to his tragic end.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/9/97/Saruman.png/revision/latest/scale-to-width-down/350?cb=20190707163339', + 'youtube_url' => 'https://www.youtube.com/watch?v=5Hjq8azf0As' + ], + [ + 'name' => 'Gollum', + 'species' => 'Stoor Hobbit (Deformed by the Ring)', + 'height' => '4\'0" (1.22m)', + 'hair' => 'Brown', + 'eyes' => 'Yellow', + 'birth' => '2430 of the Third Age', + 'death' => '3019 of the Third Age (fell into Mount Doom)', + 'title' => 'Gollum (Sméagol)', + 'occupation' => 'Former Hobbit, Ring-bearer (for a time)', + 'affiliation' => 'None, though he briefly aided Frodo', + 'bio' => 'Gollum, originally named Sméagol, was a Stoor Hobbit who found the One Ring and was consumed by it. The Ring corrupted him, turning him into the creature known as Gollum. His obsession with the Ring led to the murder of his friend Deagol, and he was forever marked by his betrayal. Over centuries, Gollum lived a tortured existence, seeking the Ring but also despising it. His split personality, Sméagol and Gollum, created a constant inner battle. Gollum played a pivotal role in the destruction of the Ring, though tragically, he took it back just before falling into the fires of Mount Doom.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/7/77/Gollum.png/revision/latest/scale-to-width-down/350?cb=20190602141623', + 'youtube_url' => 'https://www.youtube.com/watch?v=1O0Xbqp7cnE' + ], + [ + 'name' => 'Elrond', + 'species' => 'Half-Elf', + 'height' => '6\'0" (1.83m)', + 'hair' => 'Brown', + 'eyes' => 'Grey', + 'birth' => 'First Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'Lord of Rivendell', + 'occupation' => 'Ruler of Rivendell', + 'affiliation' => 'The Free Peoples of Middle-earth', + 'bio' => 'Elrond is a Half-Elf and the Lord of Rivendell. A key figure in the struggle against Sauron, he was known for his wisdom and leadership. Elrond played an essential role in both the formation of the Fellowship of the Ring and in the Battle of the Last Alliance. He also helped raise Aragorn, and his counsel was crucial to the success of the War of the Ring. Elrond’s heritage as both a descendant of Elves and Men made him uniquely equipped to guide the future of Middle-earth. After the Ring’s destruction, he sailed west to the Undying Lands.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/a/a9/Elrond.png/revision/latest/scale-to-width-down/350?cb=20190507161536', + 'youtube_url' => 'https://www.youtube.com/watch?v=kXAlrl0lOdw' + ], + [ + 'name' => 'Bilbo Baggins', + 'species' => 'Hobbit', + 'height' => '3\'6" (1.07m)', + 'hair' => 'Brown', + 'eyes' => 'Blue', + 'birth' => '2890 of the Third Age', + 'death' => 'Unknown, last seen sailing to the Undying Lands', + 'title' => 'The Mad Baggins, Ring-bearer', + 'occupation' => 'Adventurer, Burglar', + 'affiliation' => 'The Fellowship of the Ring, Thorin\'s Company', + 'bio' => 'Bilbo Baggins was a Hobbit from the Shire who found the One Ring during an unexpected adventure with Thorin Oakenshield and his company of dwarves. This encounter, which began as a simple adventure, would change his life and the fate of Middle-earth. Bilbo kept the Ring for many years, unaware of its true power, but the discovery of the Ring set in motion the events of the War of the Ring. Bilbo later passed the Ring to his nephew, Frodo, and retired to Rivendell, where he lived out his remaining years before sailing west.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/d/d2/Bilbo_Baggins.png/revision/latest/scale-to-width-down/350?cb=20190617101623', + 'youtube_url' => 'https://www.youtube.com/watch?v=zG1PzRJLUZ4' + ], + [ + 'name' => 'Arwen', + 'species' => 'Elf', + 'height' => '5\'6" (1.68m)', + 'hair' => 'Brown', + 'eyes' => 'Grey', + 'birth' => '2941 of the Third Age', + 'death' => 'Unknown, sails to the Undying Lands after Aragorn’s death', + 'title' => 'Evenstar of Rivendell', + 'occupation' => 'Princess of Rivendell', + 'affiliation' => 'The Free Peoples of Middle-earth', + 'bio' => 'Arwen Undómiel was an Elven princess and the daughter of Elrond. She was famed for her beauty and wisdom, but also for her deep love for Aragorn. Arwen’s choice to forsake her immortality and marry Aragorn was one of the most significant acts in the fight against Sauron. Her love for Aragorn played a pivotal role in inspiring him to take up his destiny as King of Gondor. After the Ring was destroyed, Arwen chose to live out her remaining years with Aragorn before eventually sailing to the Undying Lands after his death.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/0/01/Arwen.png/revision/latest/scale-to-width-down/350?cb=20190619134045', + 'youtube_url' => 'https://www.youtube.com/watch?v=PEt93XqcnWI' + ], + [ + 'name' => 'Théoden', + 'species' => 'Human', + 'height' => '5\'11" (1.80m)', + 'hair' => 'Blonde', + 'eyes' => 'Blue', + 'birth' => '2948 of the Third Age', + 'death' => '3019 of the Third Age (Killed in battle)', + 'title' => 'King of Rohan', + 'occupation' => 'King', + 'affiliation' => 'The Kingdom of Rohan', + 'bio' => 'Théoden was the King of Rohan during the War of the Ring. Initially under the influence of Saruman’s magic, Théoden was restored to his full strength and vigor by Gandalf. As king, he led the Riders of Rohan into battle at Helm’s Deep and the Battle of the Pelennor Fields, playing a key role in the defeat of Sauron’s forces. Despite his valor, Théoden died in the battle at the gates of Minas Tirith, but his legacy lived on through his son Éomer.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/e/e1/Theoden.png/revision/latest/scale-to-width-down/350?cb=20190707163430', + 'youtube_url' => 'https://www.youtube.com/watch?v=ykZlfPXTf7g' + ], + [ + 'name' => 'Éomer', + 'species' => 'Human', + 'height' => '6\'0" (1.83m)', + 'hair' => 'Blonde', + 'eyes' => 'Blue', + 'birth' => '2991 of the Third Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'King of Rohan', + 'occupation' => 'King, Rider of Rohan', + 'affiliation' => 'The Kingdom of Rohan', + 'bio' => 'Éomer was the nephew of Théoden and the son of Éomund. A brave and skilled warrior, he was instrumental in the defense of Rohan during the War of the Ring. He led the Riders of Rohan in the Battle of Helm’s Deep and the Battle of the Pelennor Fields, where his forces helped turn the tide in favor of the Free Peoples. After the death of his uncle, Théoden, Éomer became King of Rohan and helped guide the kingdom into a new era of prosperity.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/3/3f/Éomer.png/revision/latest/scale-to-width-down/350?cb=20190707163551', + 'youtube_url' => 'https://www.youtube.com/watch?v=s5qGzysfjoE' + ], + [ + 'name' => 'Faramir', + 'species' => 'Human', + 'height' => '5\'10" (1.78m)', + 'hair' => 'Brown', + 'eyes' => 'Grey', + 'birth' => '2983 of the Third Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'Captain of Gondor', + 'occupation' => 'Soldier, Ranger', + 'affiliation' => 'The Kingdom of Gondor', + 'bio' => 'Faramir was the younger brother of Boromir and the son of Denethor II, Steward of Gondor. As Captain of Gondor’s Rangers, he led the defense of Ithilien against the forces of Sauron. Faramir was a wise and honorable man, contrasting with his brother Boromir’s more impulsive nature. He helped Frodo and Sam on their journey to destroy the One Ring and refused to take the Ring for himself, showing the strength of his character. After the War of the Ring, Faramir became the Steward of Gondor and married Éowyn of Rohan.', + 'image_url' => 'https://static.wikia.nocookie.net/lotr/images/4/43/Faramir.jpg/revision/latest?cb=20071211235438', + 'youtube_url' => 'https://www.youtube.com/embed/ZSlRqLu1gcs' + ], + [ + 'name' => 'Éowyn', + 'species' => 'Human', + 'height' => '5\'7" (1.70m)', + 'hair' => 'Blonde', + 'eyes' => 'Blue', + 'birth' => '2995 of the Third Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'Lady of Rohan', + 'occupation' => 'Shieldmaiden, Queen', + 'affiliation' => 'The Kingdom of Rohan', + 'bio' => 'Éowyn was the niece of King Théoden and the sister of Éomer. She was a courageous and skilled fighter, defying the traditional role of women in her society. Her most notable moment came when she disguised herself as a man to fight in the Battle of the Pelennor Fields, where she slew the Witch-king of Angmar, the Lord of the Nazgûl. After the War of the Ring, she married Faramir, and they ruled Gondor together. Her journey was one of self-discovery, from being trapped by societal expectations to finding her true calling.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/c/c0/Eowyn_2.png/revision/latest/scale-to-width-down/350?cb=20190602142116', + 'youtube_url' => 'https://www.youtube.com/watch?v=5-fMhQ_zTr8' + ], + [ + 'name' => 'Gollum (Sméagol)', + 'species' => 'Hobbit (Deformed by the Ring)', + 'height' => '4\'0" (1.22m)', + 'hair' => 'Brown', + 'eyes' => 'Yellow', + 'birth' => '2430 of the Third Age', + 'death' => '3019 of the Third Age (Fell into Mount Doom)', + 'title' => 'Gollum', + 'occupation' => 'Former Hobbit, Ring-bearer', + 'affiliation' => 'None, briefly helped Frodo', + 'bio' => 'Sméagol, later known as Gollum, was once a Stoor Hobbit who found the One Ring. The Ring corrupted him, leading to the murder of his friend and the exile of Sméagol. For centuries, Gollum lived a twisted existence, driven by his obsession with the Ring. Throughout the story, Gollum struggled between his two personalities—Sméagol, the more innocent self, and Gollum, the corrupted, selfish creature. He played a key role in the destruction of the Ring when he bit it off Frodo’s finger but ultimately fell into the fires of Mount Doom with it, ending the Ring’s reign of terror.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/4/4f/Gollum_darker.png/revision/latest/scale-to-width-down/350?cb=20190602142125', + 'youtube_url' => 'https://www.youtube.com/watch?v=pV9kLg5HEV4' + ], + [ + 'name' => 'Treebeard', + 'species' => 'Ent', + 'height' => 'Unknown, towering', + 'hair' => 'Leaves, moss', + 'eyes' => 'Brown, deep', + 'birth' => 'Unknown, ancient', + 'death' => 'Unknown, possibly still alive', + 'title' => 'Guardian of the Forest', + 'occupation' => 'Shepherd of the Trees', + 'affiliation' => 'The Free Peoples of Middle-earth', + 'bio' => 'Treebeard is one of the ancient Ents, guardians of the forests in Middle-earth. He is the oldest of his kind, and he represents the last of the Ents who have remained true to their mission. He initially hesitated to take action against Saruman, but after witnessing the devastation of his forest, he led the Ents in an assault on Isengard. Treebeard’s wise and ancient nature was crucial in turning the tide of the war, as his Ents laid waste to Saruman’s fortress. He later returned to his forests, where he continues to watch over the world’s trees.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/4/4a/Treebeard.png/revision/latest/scale-to-width-down/350?cb=20190602142134', + 'youtube_url' => 'https://www.youtube.com/watch?v=Asxq6zT8QnA' + ], + [ + 'name' => 'Radagast the Brown', + 'species' => 'Maia (Spirit)', + 'height' => 'Unknown', + 'hair' => 'Brown', + 'eyes' => 'Brown', + 'birth' => 'Uncertain, an ancient Maia spirit', + 'death' => 'Unknown', + 'title' => 'Radagast the Brown', + 'occupation' => 'Wizard, Guardian of Nature', + 'affiliation' => 'The Free Peoples of Middle-earth', + 'bio' => 'Radagast the Brown is one of the five Istari sent by the Valar to Middle-earth. Unlike Gandalf and Saruman, Radagast focused on the study and protection of nature, particularly animals and plants. He was a recluse, living in the forests and mountains of Rohan. Though not as prominent in the War of the Ring, Radagast played a supporting role, especially in his connection with the animals and creatures of Middle-earth. His gentle nature and love for wildlife made him a quieter, more peaceful figure compared to other wizards.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/1/1d/Radagast_the_Brown.png/revision/latest/scale-to-width-down/350?cb=20190602142205', + 'youtube_url' => 'https://www.youtube.com/watch?v=Fb6DTlWGG7A' + ], + [ + 'name' => 'Glorfindel', + 'species' => 'Elf', + 'height' => '6\'0" (1.83m)', + 'hair' => 'Blonde', + 'eyes' => 'Grey', + 'birth' => 'First Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'Lord of Rivendell', + 'occupation' => 'Warrior, Lord of Rivendell', + 'affiliation' => 'The Free Peoples of Middle-earth', + 'bio' => 'Glorfindel is an ancient and noble Elf who played an instrumental role in both the First and Third Ages of Middle-earth. He fought in the Battle of Gondolin during the First Age and was resurrected after dying in battle, embodying the Elven resilience. In the Third Age, Glorfindel returned to Middle-earth and played a significant role in aiding the Fellowship, particularly by escorting Frodo from the Shire to Rivendell. His courage and nobility were evident in all his actions, and he was one of the few Elves who did not sail to the Undying Lands after the Ring’s destruction.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/7/7d/Glorfindel.png/revision/latest/scale-to-width-down/350?cb=20190602142217', + 'youtube_url' => 'https://www.youtube.com/watch?v=4r7ntxaHE9o' + ], + [ + 'name' => 'Denethor II', + 'species' => 'Human', + 'height' => '5\'11" (1.80m)', + 'hair' => 'Black', + 'eyes' => 'Grey', + 'birth' => '2930 of the Third Age', + 'death' => '3019 of the Third Age (Suicide by Fire)', + 'title' => 'Steward of Gondor', + 'occupation' => 'Steward of Gondor', + 'affiliation' => 'The Kingdom of Gondor', + 'bio' => 'Denethor II was the 26th Steward of Gondor, serving in a time of great crisis. Although he was a skilled and capable ruler at times, Denethor’s obsession with protecting Gondor from Sauron’s threat, combined with his growing paranoia and despair, led to his tragic downfall. He was manipulated by the Palantír and lost all hope when he believed his son Boromir was dead. Ultimately, Denethor’s mental state deteriorated, and he perished by his own hand, setting fire to himself in an act of despair.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/1/1d/Denethor.png/revision/latest/scale-to-width-down/350?cb=20190602142111', + 'youtube_url' => 'https://www.youtube.com/watch?v=CU6TByLVR6k' + ], + [ + 'name' => 'Éomer', + 'species' => 'Human', + 'height' => '6\'0" (1.83m)', + 'hair' => 'Blonde', + 'eyes' => 'Blue', + 'birth' => '2991 of the Third Age', + 'death' => 'Unknown, likely still alive in the Fourth Age', + 'title' => 'King of Rohan', + 'occupation' => 'King, Rider of Rohan', + 'affiliation' => 'The Kingdom of Rohan', + 'bio' => 'Éomer was the nephew of Théoden and the son of Éomund. A brave and skilled warrior, he was instrumental in the defense of Rohan during the War of the Ring. He led the Riders of Rohan in the Battle of Helm’s Deep and the Battle of the Pelennor Fields, where his forces helped turn the tide in favor of the Free Peoples. After the death of his uncle, Théoden, Éomer became King of Rohan and helped guide the kingdom into a new era of prosperity.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/3/3f/Éomer.png/revision/latest/scale-to-width-down/350?cb=20190707163551', + 'youtube_url' => 'https://www.youtube.com/watch?v=s5qGzysfjoE' + ], + [ + 'name' => 'Haldir', + 'species' => 'Elf', + 'height' => '6\'2" (1.88m)', + 'hair' => 'Blonde', + 'eyes' => 'Grey', + 'birth' => 'Unknown, ancient', + 'death' => '3019 of the Third Age (Killed in the Battle of Helm\'s Deep)', + 'title' => 'Marchwarden of Lothlórien', + 'occupation' => 'Elf Warrior, Guard of Lothlórien', + 'affiliation' => 'Lothlórien, The Free Peoples of Middle-earth', + 'bio' => 'Haldir was a high-ranking Elven warrior from Lothlórien and the Marchwarden of the realm, responsible for guarding the borders of the woodland kingdom. He appeared in *The Two Towers* to lead an Elven force to the defense of Helm’s Deep, forming an unlikely alliance between the Elves and the Men of Rohan. Though his death in battle was brief, his valiant sacrifice and support of the Free Peoples in their time of need left a lasting impression.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/5/50/Haldir.png/revision/latest/scale-to-width-down/350?cb=20190602142155', + 'youtube_url' => 'https://www.youtube.com/watch?v=2rpjH9ZWLg4' + ], + [ + 'name' => 'The Witch-king of Angmar', + 'species' => 'Ringwraith (Human)', + 'height' => '7\'0" (2.13m)', + 'hair' => 'None (Faceless)', + 'eyes' => 'Red (Glowing)', + 'birth' => 'Unknown, 1000s of years ago', + 'death' => '3019 of the Third Age (Killed by Éowyn)', + 'title' => 'Lord of the Nazgûl', + 'occupation' => 'Servant of Sauron', + 'affiliation' => 'Sauron, The Nazgûl', + 'bio' => 'The Witch-king of Angmar was the most powerful of the Nazgûl, Sauron’s terrifying ringwraiths. Once a King of Men, he was corrupted by the power of the One Ring, becoming a servant of Sauron. He led the forces of Mordor in numerous campaigns, including the conquest of Gondor and the destruction of Arnor. The Witch-king was a fearsome presence on the battlefield, but he met his end in the Battle of the Pelennor Fields, where he was defeated by Éowyn and Merry, fulfilling the prophecy that no man could kill him.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/9/9e/Witch-king.png/revision/latest/scale-to-width-down/350?cb=20190602142112', + 'youtube_url' => 'https://www.youtube.com/watch?v=rKL8FgZzm7o' + ], + [ + 'name' => 'Gothmog (Lieutenant of Morgul)', + 'species' => 'Orc', + 'height' => '7\'0" (2.13m)', + 'hair' => 'None (Pale, Corpse-like)', + 'eyes' => 'Red', + 'birth' => 'Unknown', + 'death' => '3019 of the Third Age (Killed in the Battle of the Black Gate)', + 'title' => 'Lieutenant of Mordor', + 'occupation' => 'Commander of the Orcs', + 'affiliation' => 'Sauron, Mordor', + 'bio' => 'Gothmog was the Lieutenant of Morgul and a high-ranking commander of Sauron’s forces in the War of the Ring. As one of the more prominent Orc leaders, he was present during the Battle of the Pelennor Fields, leading the forces of Mordor. Gothmog’s grotesque appearance and ruthlessness made him a terrifying figure. He met his end in the Battle of the Black Gate, where his forces were destroyed and he himself was slain by the armies of Gondor and Rohan.', + 'image_url' => 'https://vignette.wikia.nocookie.net/lotr/images/9/94/Gothmog_Lieutenant_of_Morgul.png/revision/latest/scale-to-width-down/350?cb=20190602142219', + 'youtube_url' => 'https://www.youtube.com/watch?v=hegeHfK5Dh4' + ] + ]; + + return $characters; + } + +} diff --git a/web/modules/custom/dc_core/src/Controller/LotrCharacters.php b/web/modules/custom/dc_core/src/Controller/LotrCharacters.php new file mode 100644 index 0000000..adb2f3b --- /dev/null +++ b/web/modules/custom/dc_core/src/Controller/LotrCharacters.php @@ -0,0 +1,21 @@ +characterList, */ + /* JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES */ + /* )); */ + return new CacheableJsonResponse($this->characterList); + } +} diff --git a/web/modules/custom/dc_core/src/Drush/Commands/CharacterImport.php b/web/modules/custom/dc_core/src/Drush/Commands/CharacterImport.php new file mode 100644 index 0000000..536b6d2 --- /dev/null +++ b/web/modules/custom/dc_core/src/Drush/Commands/CharacterImport.php @@ -0,0 +1,52 @@ +get($character_endpoint)->getBody()->getContents(); + $json_data = json_decode($data, TRUE); + // Create the queue. + $character_import_queue = \Drupal::queue('character_import'); + + foreach ($json_data as $id => $api_character) { + // Load corresponding Drupal entity, check last modified. + $properties = [ + 'field_character_id' => $id, + ]; + + $drupal_entity = \Drupal::entityTypeManager() + ->getStorage('node') + ->loadByProperties($properties); + + if (empty($drupal_entity)) { + $character = new \stdClass(); + $character->id = $id; + $character->operation = "CREATE"; + $character_import_queue->createItem($character); + } + else { + $drupal_entity = reset($drupal_entity); + $changed = $drupal_entity->getChangedTime(); + if ($changed < $api_character['last_modified']) { + $character = new \stdClass(); + $character->id = $id; + $character->operation = "UPDATE"; + $character_import_queue->createItem($character); + }; + } + } + } + +} diff --git a/web/modules/custom/dc_core/src/Plugin/QueueWorker/CharacterQueueWorker.php b/web/modules/custom/dc_core/src/Plugin/QueueWorker/CharacterQueueWorker.php new file mode 100644 index 0000000..596eddb --- /dev/null +++ b/web/modules/custom/dc_core/src/Plugin/QueueWorker/CharacterQueueWorker.php @@ -0,0 +1,162 @@ +entityTypeManager = $entity_type_manager; + $this->database = $database; + } + + /** + * Used to grab functionality from the container. + * + * @param \Symfony\Component\DependencyInjection\ContainerInterface $container + * The container. + * @param array $configuration + * Configuration array. + * @param mixed $plugin_id + * The plugin id. + * @param mixed $plugin_definition + * The plugin definition. + * @return static + */ + public static function create( + ContainerInterface $container, + array $configuration, + $plugin_id, + $plugin_definition + ) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('entity_type.manager'), + $container->get('database'), + ); + } + + /** + * Processes an item in the queue. + * + * @param mixed $data + * The queue item data. + * + * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException + * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException + * @throws \Drupal\Core\Entity\EntityStorageException + * @throws \Exception + */ + public function processItem($data) { + $client = \Drupal::httpClient(); + $url = "https://dchadwick.ddev.site/api/character-list"; + $character_api_data = $client->request('GET', $url, ['verify' => false])->getBody()->getContents(); + $json_data = json_decode($character_api_data, TRUE); + $target_data = $json_data[$data->id]; + + if ($data->operation == "CREATE") { + $node_values = [ + 'type' => 'character', + 'title' => $target_data['name'], + 'field_species' => $target_data['species'], + 'field_character_height' => $target_data['height'], + 'field_hair' => $target_data['hair'], + 'field_eyes' => $target_data['eyes'], + 'field_birth' => $target_data['birth'], + 'field_death' => $target_data['death'], + 'field_character_title' => $target_data['title'], + 'field_occupation' => $target_data['occupation'], + 'field_affiliation' => $target_data['affiliation'], + 'field_bio' => ['value' => $target_data['bio']], + 'field_character_image' => $target_data['image_url'], + 'field_character_id' => $data->id, + 'field_youtube_url' => $target_data['youtube_url'], + ]; + $node = \Drupal::entityTypeManager()->getStorage('node')->create($node_values)->save(); + \Drupal::logger('dc_core')->notice("Created character " . $target_data['name']); + } + elseif ($data->operation == "UPDATE") { + // load the entity by character id. + $existing_entity = $this->entityTypeManager->getStorage('node')->loadByProperties([ + 'type' => 'character', + 'field_character_id' => $data->id, + ]); + $existing_entity = reset($existing_entity); + $node_values = [ + 'title' => $target_data['name'], + 'field_species' => $target_data['species'], + 'field_character_height' => $target_data['height'], + 'field_hair' => $target_data['hair'], + 'field_eyes' => $target_data['eyes'], + 'field_birth' => $target_data['birth'], + 'field_death' => $target_data['death'], + 'field_character_title' => $target_data['title'], + 'field_occupation' => $target_data['occupation'], + 'field_affiliation' => $target_data['affiliation'], + 'field_bio' => ['value' => $target_data['bio']], + 'field_character_image' => $target_data['image_url'], + 'field_character_id' => $data->id, + 'field_youtube_url' => $target_data['youtube_url'], + ]; + foreach ($node_values as $field_name => $value) { + $existing_entity->set($field_name, $value); + } + $existing_entity->save(); + \Drupal::logger('dc_core')->notice("Updated character " . $target_data['name']); + } + + } + +} diff --git a/web/modules/custom/dc_core/tests/src/Functional/LotrTests.php b/web/modules/custom/dc_core/tests/src/Functional/LotrTests.php new file mode 100644 index 0000000..54072c9 --- /dev/null +++ b/web/modules/custom/dc_core/tests/src/Functional/LotrTests.php @@ -0,0 +1,55 @@ +drupalGet(''); + $this->assertSession()->statusCodeEquals(200); + } + + public function testControllerData() { + $this->drupalGet("api/character-list"); + $session = $this->assertSession(); + $session->statusCodeEquals(200); + $session->responseHeaderEquals('Content-Type', 'application/json'); + $session->pageTextContains("Frodo Baggins"); + } + +} diff --git a/web/modules/custom/ufc/config/install/core.base_field_override.node.fight.promote.yml b/web/modules/custom/ufc/config/x-nstall/core.base_field_override.node.fight.promote.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.base_field_override.node.fight.promote.yml rename to web/modules/custom/ufc/config/x-nstall/core.base_field_override.node.fight.promote.yml diff --git a/web/modules/custom/ufc/config/install/core.base_field_override.node.fighter.promote.yml b/web/modules/custom/ufc/config/x-nstall/core.base_field_override.node.fighter.promote.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.base_field_override.node.fighter.promote.yml rename to web/modules/custom/ufc/config/x-nstall/core.base_field_override.node.fighter.promote.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_form_display.node.fight.default.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_form_display.node.fight.default.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_form_display.node.fight.default.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_form_display.node.fight.default.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_form_display.node.fighter.default.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_form_display.node.fighter.default.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_form_display.node.fighter.default.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_form_display.node.fighter.default.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_view_display.node.fight.default.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fight.default.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_view_display.node.fight.default.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fight.default.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_view_display.node.fight.teaser.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fight.teaser.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_view_display.node.fight.teaser.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fight.teaser.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_view_display.node.fighter.default.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fighter.default.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_view_display.node.fighter.default.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fighter.default.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_view_display.node.fighter.rss.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fighter.rss.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_view_display.node.fighter.rss.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fighter.rss.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_view_display.node.fighter.teaser.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fighter.teaser.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_view_display.node.fighter.teaser.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_view_display.node.fighter.teaser.yml diff --git a/web/modules/custom/ufc/config/install/core.entity_view_display.taxonomy_term.ufc_events.default.yml b/web/modules/custom/ufc/config/x-nstall/core.entity_view_display.taxonomy_term.ufc_events.default.yml similarity index 100% rename from web/modules/custom/ufc/config/install/core.entity_view_display.taxonomy_term.ufc_events.default.yml rename to web/modules/custom/ufc/config/x-nstall/core.entity_view_display.taxonomy_term.ufc_events.default.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.body.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.body.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.body.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.body.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.field_accuracy.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_accuracy.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.field_accuracy.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_accuracy.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.field_event.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_event.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.field_event.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_event.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.field_fighter_one.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_fighter_one.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.field_fighter_one.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_fighter_one.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.field_fighter_two.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_fighter_two.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.field_fighter_two.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_fighter_two.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.field_prediction.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_prediction.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.field_prediction.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_prediction.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fight.field_result.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_result.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fight.field_result.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fight.field_result.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.body.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.body.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.body.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.body.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_absorbed_per_min.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_absorbed_per_min.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_absorbed_per_min.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_absorbed_per_min.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_age.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_age.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_age.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_age.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_decisions.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_decisions.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_decisions.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_decisions.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_division.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_division.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_division.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_division.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_first_name.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_first_name.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_first_name.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_first_name.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_grappling_accuracy.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_grappling_accuracy.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_grappling_accuracy.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_grappling_accuracy.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_height.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_height.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_height.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_height.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_knockdown_ratio.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_knockdown_ratio.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_knockdown_ratio.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_knockdown_ratio.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_knockouts.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_knockouts.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_knockouts.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_knockouts.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_last_name.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_last_name.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_last_name.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_last_name.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_leg_reach.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_leg_reach.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_leg_reach.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_leg_reach.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_losses.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_losses.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_losses.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_losses.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_player_photo.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_player_photo.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_player_photo.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_player_photo.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_reach.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_reach.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_reach.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_reach.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_strikes_per_minute.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_strikes_per_minute.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_strikes_per_minute.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_strikes_per_minute.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_striking_accuracy.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_striking_accuracy.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_striking_accuracy.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_striking_accuracy.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_submissions.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_submissions.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_submissions.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_submissions.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_takedowns_per_15.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_takedowns_per_15.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_takedowns_per_15.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_takedowns_per_15.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_ties.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_ties.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_ties.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_ties.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_weight.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_weight.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_weight.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_weight.yml diff --git a/web/modules/custom/ufc/config/install/field.field.node.fighter.field_wins.yml b/web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_wins.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.node.fighter.field_wins.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.node.fighter.field_wins.yml diff --git a/web/modules/custom/ufc/config/install/field.field.taxonomy_term.ufc_events.field_event_date.yml b/web/modules/custom/ufc/config/x-nstall/field.field.taxonomy_term.ufc_events.field_event_date.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.field.taxonomy_term.ufc_events.field_event_date.yml rename to web/modules/custom/ufc/config/x-nstall/field.field.taxonomy_term.ufc_events.field_event_date.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_absorbed_per_min.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_absorbed_per_min.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_absorbed_per_min.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_absorbed_per_min.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_accuracy.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_accuracy.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_accuracy.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_accuracy.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_age.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_age.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_age.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_age.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_decisions.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_decisions.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_decisions.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_decisions.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_division.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_division.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_division.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_division.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_event.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_event.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_event.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_event.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_fighter_one.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_fighter_one.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_fighter_one.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_fighter_one.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_fighter_two.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_fighter_two.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_fighter_two.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_fighter_two.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_first_name.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_first_name.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_first_name.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_first_name.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_grappling_accuracy.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_grappling_accuracy.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_grappling_accuracy.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_grappling_accuracy.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_height.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_height.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_height.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_height.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_knockdown_ratio.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_knockdown_ratio.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_knockdown_ratio.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_knockdown_ratio.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_knockouts.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_knockouts.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_knockouts.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_knockouts.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_last_name.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_last_name.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_last_name.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_last_name.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_leg_reach.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_leg_reach.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_leg_reach.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_leg_reach.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_losses.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_losses.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_losses.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_losses.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_player_photo.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_player_photo.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_player_photo.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_player_photo.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_prediction.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_prediction.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_prediction.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_prediction.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_reach.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_reach.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_reach.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_reach.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_result.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_result.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_result.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_result.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_strikes_per_minute.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_strikes_per_minute.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_strikes_per_minute.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_strikes_per_minute.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_striking_accuracy.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_striking_accuracy.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_striking_accuracy.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_striking_accuracy.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_submissions.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_submissions.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_submissions.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_submissions.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_takedowns_per_15.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_takedowns_per_15.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_takedowns_per_15.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_takedowns_per_15.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_ties.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_ties.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_ties.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_ties.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_weight.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_weight.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_weight.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_weight.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.node.field_wins.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.node.field_wins.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.node.field_wins.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.node.field_wins.yml diff --git a/web/modules/custom/ufc/config/install/field.storage.taxonomy_term.field_event_date.yml b/web/modules/custom/ufc/config/x-nstall/field.storage.taxonomy_term.field_event_date.yml similarity index 100% rename from web/modules/custom/ufc/config/install/field.storage.taxonomy_term.field_event_date.yml rename to web/modules/custom/ufc/config/x-nstall/field.storage.taxonomy_term.field_event_date.yml diff --git a/web/modules/custom/ufc/config/install/node.type.fight.yml b/web/modules/custom/ufc/config/x-nstall/node.type.fight.yml similarity index 100% rename from web/modules/custom/ufc/config/install/node.type.fight.yml rename to web/modules/custom/ufc/config/x-nstall/node.type.fight.yml diff --git a/web/modules/custom/ufc/config/install/node.type.fighter.yml b/web/modules/custom/ufc/config/x-nstall/node.type.fighter.yml similarity index 100% rename from web/modules/custom/ufc/config/install/node.type.fighter.yml rename to web/modules/custom/ufc/config/x-nstall/node.type.fighter.yml diff --git a/web/modules/custom/ufc/config/install/pathauto.pattern.fights.yml b/web/modules/custom/ufc/config/x-nstall/pathauto.pattern.fights.yml similarity index 100% rename from web/modules/custom/ufc/config/install/pathauto.pattern.fights.yml rename to web/modules/custom/ufc/config/x-nstall/pathauto.pattern.fights.yml diff --git a/web/modules/custom/ufc/config/install/taxonomy.vocabulary.ufc_divisions.yml b/web/modules/custom/ufc/config/x-nstall/taxonomy.vocabulary.ufc_divisions.yml similarity index 100% rename from web/modules/custom/ufc/config/install/taxonomy.vocabulary.ufc_divisions.yml rename to web/modules/custom/ufc/config/x-nstall/taxonomy.vocabulary.ufc_divisions.yml diff --git a/web/modules/custom/ufc/config/install/taxonomy.vocabulary.ufc_events.yml b/web/modules/custom/ufc/config/x-nstall/taxonomy.vocabulary.ufc_events.yml similarity index 100% rename from web/modules/custom/ufc/config/install/taxonomy.vocabulary.ufc_events.yml rename to web/modules/custom/ufc/config/x-nstall/taxonomy.vocabulary.ufc_events.yml diff --git a/web/modules/custom/ufc/config/install/ufc.weights.yml b/web/modules/custom/ufc/config/x-nstall/ufc.weights.yml similarity index 100% rename from web/modules/custom/ufc/config/install/ufc.weights.yml rename to web/modules/custom/ufc/config/x-nstall/ufc.weights.yml diff --git a/web/modules/custom/ufc/src/Commands/UfcCommands.php b/web/modules/custom/ufc/src/Commands/UfcCommands.php index 6d87c5d..3dbea05 100644 --- a/web/modules/custom/ufc/src/Commands/UfcCommands.php +++ b/web/modules/custom/ufc/src/Commands/UfcCommands.php @@ -2,37 +2,166 @@ namespace Drupal\ufc\Commands; +use Drupal\ufc\Services\FighterImporter; +use Drupal\ufc\Services\FightImporter; +use Drupal\Core\Batch\BatchBuilder; use Drupal\node\Entity\Node; use Drush\Commands\DrushCommands; +use Drush\Attributes as CLI; +use Symfony\Component\DomCrawler\Crawler; class UfcCommands extends DrushCommands { + protected $cacheId = 'ufc:fighter-list'; + + /** + * Import fighters from UFC.com. + */ + #[CLI\Command(name: 'ufc:import-fighters', aliases: ['impft'])] + public function importFighters(): void { + // Fighter importer service. + $fighter_importer = \Drupal::service('ufc.import_fighters'); + + // First check for the item in cache. + $fighter_list = \Drupal::cache()->get($this->cacheId); + if (!$fighter_list) { + $fighter_list = $fighter_importer->getListOfCurrentFighters(); + \Drupal::cache()->set($this->cacheId, $fighter_list, time() + 86400); + } + else { + $fighter_list = $fighter_list->data; + } + + // Add each division to a batch process. + $batch = new BatchBuilder(); + $batch->setTitle("Starting Complete Fighter Import") + ->setFinishCallback([UfcCommands::class, 'importFinished']) + ->setInitMessage("Importing..."); + foreach ($fighter_list as $division => $fighters) { + $args = [ + $division, + $fighters, + ]; + $batch->addOperation([FighterImporter::class, 'processDivision'], $args); + } + + // Set and run the batch. + batch_set($batch->toArray()); + drush_backend_batch_process(); + } + + /** + * Import events based on ESPN.com. + */ + #[CLI\Command(name: 'ufc:import-events', aliases: ['impev'])] + public function importEvents(): void { + $fight_importer = \Drupal::service("ufc.import_fights"); + $event_list = []; + $events_base= "https://www.espn.com/mma/schedule/_/year/"; + $event_base = "https://www.espn.com"; + + // Old fashioned for loop to target years. + for ($i = 2000; $i <= 2025; $i++) { + $year_event_url = $events_base . "{$i}/league/ufc"; + $event_listing = \Drupal::httpClient() + ->get($year_event_url)->getBody()->getContents(); + $crawler = new Crawler($event_listing); + $events = $crawler->filter('.Schedule__EventLeague--ufc tbody tr'); + foreach ($events as $event) { + $event_list[$i][] = $event->ownerDocument->saveHTML($event); + } + } + + // Add each division to a batch process. + $batch = new BatchBuilder(); + $batch->setTitle("Starting Event Import") + ->setFinishCallback([UfcCommands::class, 'eventImportFinished']) + ->setInitMessage("Importing events..."); + foreach ($event_list as $year => $events) { + foreach ($events as $event) { + $args = [ + $event, + $year, + ]; + $batch->addOperation([FightImporter::class, 'processEvent'], $args); + } + } + + // Set and run the batch. + batch_set($batch->toArray()); + drush_backend_batch_process(); + } + /** * Update fights with their event date. - * - * @command ufc:update-fight-dates - * @aliases ufc-ufd */ - public function updateFightDates() { + #[CLI\Command(name: 'ufc:update-fight-dates', aliases: ['ufd'])] + public function updateFightDates(): void { // Get all fights - // For each fight - // Go get event date. - // Add to new field - // Save. $fights = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'fight']); + // Add each division to a batch process. + $batch = new BatchBuilder(); + $batch->setTitle("Starting Fight Update") + ->setFinishCallback([UfcCommands::class, 'eventImportFinished']) + ->setInitMessage("Importing events..."); foreach ($fights as $fight) { - $fight->field_fight_date = $this->getEventDateTimestampFromFight($fight); - if ($fight->save()) { - $this->output->writeln($fight->title->value . " updated successfully."); - } - else { - $this->output->writeln($fight->title->value . " failed."); - } + $args = [ + $fight, + ]; + $batch->addOperation([UfcCommands::class, 'updateFight'], $args); + } + // Set and run the batch. + batch_set($batch->toArray()); + drush_backend_batch_process(); + } + + public static function updateFight($fight, $context) { + $fight->field_fight_date = [UfcCommands::class, 'getEventDateTimestampFromFight', $fight]; + if ($fight->save()) { + \Drupal::messenger()->addMessage($fight->title->value . " updated successfully."); + } + else { + \Drupal::messenger()->addMessage($fight->title->value . " failed."); } } + /** + * Create Fights. + */ + #[CLI\Command(name: 'ufc:create-fights', aliases: ['cf'])] + public function createUfcFights(): void { + $existing_fights = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'fight']); + foreach ($existing_fights as $existing_fight) { + $delete = $existing_fight->delete(); + if ($delete) { + \Drupal::logger('ufc')->notice("Removed " . $existing_fight->getTitle()); + } + } + // Get all events - add each to queue, fights created per event. + $events = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['vid' => 'ufc_events']); + // Add each division to a batch process. + $batch = new BatchBuilder(); + $batch->setTitle("Creating fights in batches....") + ->setFinishCallback([UfcCommands::class, 'importFinished']) + ->setInitMessage("Processing"); + foreach ($events as $event) { + if ($event->field_event_url->uri == '/mma/fightcenter/_/id/600037492/league/ufc') { + continue; + } + $args = [ + $event, + ]; + $batch->addOperation([FightImporter::class, 'createFightsByEvent'], $args); + } + // Set and run the batch. + batch_set($batch->toArray()); + drush_backend_batch_process(); + } - private function getEventDateTimestampFromFight(Node $fight_node) { + /** + * Gets the event date as a timestamp. + */ + private function getEventDateTimestampFromFight(Node $fight_node): int|bool { // Get field value. $event_date_value = $fight_node->field_event->entity->field_event_date->value; assert($event_date_value, !null); @@ -40,4 +169,40 @@ private function getEventDateTimestampFromFight(Node $fight_node) { return strtotime($event_date_value); } + /** + * Handle batch completion. + * + * @param bool $success + * TRUE if all batch API tasks were completed successfully. + * @param array $results + * An results array from the batch processing operations. + * @param array $operations + * A list of the operations that had not been completed. + * @param string $elapsed + * Batch.inc kindly provides the elapsed processing time in seconds. + */ + public static function importFinished(bool $success, array $results, array $operations, string $elapsed): void { + // Finish the batch here. + $message = "Processed " . $results['processed'] . " divisions."; + \Drupal::messenger()->addMessage($message); + } + + /** + * Handle batch completion. + * + * @param bool $success + * TRUE if all batch API tasks were completed successfully. + * @param array $results + * An results array from the batch processing operations. + * @param array $operations + * A list of the operations that had not been completed. + * @param string $elapsed + * Batch.inc kindly provides the elapsed processing time in seconds. + */ + public static function eventImportFinished(bool $success, array $results, array $operations, string $elapsed): void { + // Finish the batch here. + $message = "Processed " . $results['processed'] . " events."; + \Drupal::messenger()->addMessage($message); + } + } diff --git a/web/modules/custom/ufc/src/Services/FightImporter.php b/web/modules/custom/ufc/src/Services/FightImporter.php index 8828f4c..074d307 100644 --- a/web/modules/custom/ufc/src/Services/FightImporter.php +++ b/web/modules/custom/ufc/src/Services/FightImporter.php @@ -7,6 +7,7 @@ use Drupal\taxonomy\Entity\Term; use Drupal\node\Entity\Node; use GuzzleHttp\Client; +use GuzzleHttp\Exception\RequestException; use Symfony\Component\DomCrawler\Crawler; class FightImporter { @@ -56,9 +57,9 @@ public function __construct( */ public function importEvents(): void { // First delete all events :-). - $this->removeExistingEvents(); + /* $this->removeExistingEvents(); */ // Old fashioned for loop to target years. - for ($i = 2000; $i <= 2024; $i++) { + for ($i = 2011; $i <= 2025; $i++) { $year_event_url = self::EVENTS_BASE . "{$i}/league/ufc"; $event_listing = $this->httpClient ->get($year_event_url)->getBody()->getContents(); @@ -83,7 +84,10 @@ public function importEvents(): void { } } - private function processEvent(\DOMElement $event, string $year): array { + /** + * Process an event into the system. + */ + public static function processEvent(\DOMElement $event, string $year): array { if ($event->childElementCount !== 4) { return []; } @@ -92,7 +96,8 @@ private function processEvent(\DOMElement $event, string $year): array { ]; for ($i = 0; $i < 4; $i++) { if ($i === 0) { - $event_date = $this->convertDate($event->childNodes[0]->textContent . " $year"); + $date_str = $event->childNodes[0]->textContent . " $year"; + $event_date = \Drupal::service('date.formatter')->format(strtotime($date_str), 'custom', 'Y-m-d'); $term_build['field_event_date'] = $event_date; } if ($i === 1) { @@ -156,32 +161,25 @@ private function removeExistingEvents(): void { /** * Create fights from events. */ - public function createFights(): void { - // Clear out past fights. - $existing_fights = $this->entityTypeManager->getStorage('node')->loadByProperties(['type' => 'fight']); - foreach ($existing_fights as $existing_fight) { - $delete = $existing_fight->delete(); - if ($delete) { - \Drupal::logger('ufc')->notice("Removed " . $existing_fight->getTitle()); - } - } - // Go get all events. - $all_events = $this->entityTypeManager->getStorage('taxonomy_term') - ->loadByProperties(['vid' => 'ufc_events']); - foreach ($all_events as $event) { - $event_page_html = $this->httpClient + public static function createFightsByEvent($event, $context): void { + try { + $event_page_html = \Drupal::httpClient() ->get(self::EVENT_BASE . $event->field_event_url->uri) ->getBody()->getContents(); $crawler = new Crawler($event_page_html); $fight_result_rows = $crawler->filter(".MMAGamestrip"); foreach ($fight_result_rows as $fight_result_row) { - $result = $this->processFightResultRow($fight_result_row); + $result = \Drupal::service('ufc.import_fights')->processFightResultRow($fight_result_row); if (empty($result)) { continue; } $result['event'] = $event->id(); - $this->createFightNodeFromResult($result); + \Drupal::service('ufc.import_fights')->createFightNodeFromResult($result); } + $context['results']['processed']++; + } catch (RequestException $e) { + $context['results']['failed']++; + dump($e->getMessage()); } } @@ -236,7 +234,7 @@ private function getFighterIdByName(string $name): int { /** * Iterate over fight result rows to extract results. */ - private function processFightResultRow(\DOMElement $row): array { + public function processFightResultRow(\DOMElement $row): array { $results = [ 'winner' => 0, ]; diff --git a/web/modules/custom/ufc/src/Services/FighterImporter.php b/web/modules/custom/ufc/src/Services/FighterImporter.php index dbc73ba..90bb9fe 100644 --- a/web/modules/custom/ufc/src/Services/FighterImporter.php +++ b/web/modules/custom/ufc/src/Services/FighterImporter.php @@ -98,9 +98,9 @@ public function importFighters(): void { else { $fighters_by_div = self::getListOfCurrentFighters(); // Process each fighter into system. - foreach ($fighters_by_div as $division => $fighters) { - $this->processDivision($division, $fighters); - } + /* foreach ($fighters_by_div as $division => $fighters) { */ + /* $this->processDivision($division, $fighters); */ + /* } */ } } /** @@ -109,9 +109,11 @@ public function importFighters(): void { * @param mixed $div * @param mixed $fighters */ - private function processDivision($div, $fighters): void { + public static function processDivision($div, $fighters, &$context): void { + \Drupal::logger('ufc')->notice("Starting to update $div"); + foreach ($fighters as $fighter_data) { - $fighter = new Fighter($this->httpClient); + $fighter = new Fighter(\Drupal::httpClient()); $fighter->first_name = $fighter_data['firstname']; $fighter->last_name = $fighter_data['lastname']; $fighter->image = $fighter_data['image']; @@ -122,7 +124,7 @@ private function processDivision($div, $fighters): void { // Check if node exists, by title. $fighter->createMediaEntityFromImage(); $title = $fighter->first_name . " " . $fighter->last_name; - $node_lookup = reset($this->entityTypeManager->getStorage('node')->loadByProperties(['title' => $title])); + $node_lookup = reset(\Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['title' => $title])); if (!empty($node_lookup)) { // Update instead of create. @@ -134,6 +136,7 @@ private function processDivision($div, $fighters): void { $fighter->createPlayerNode(); } } + $context['results']['processed']++; } /** @@ -157,7 +160,6 @@ public function getListOfCurrentFighters(): array { * @param string $base_url */ public function loopThroughFighterPages($base_url): void { - // Here you are Dan. // Implement caching to store instead of needing fresh requests. for ($i=0; $i<=100; $i++) { $ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15'; @@ -165,7 +167,7 @@ public function loopThroughFighterPages($base_url): void { 'referer' => true, 'verify' => false, 'headers' => [ - 'User-Agent' => 'DC SCRAPER/v1.0', + 'User-Agent' => $ua, 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Encoding' => 'gzip, deflate, br', ] diff --git a/web/modules/custom/ufc/tests/src/Unit/WebScraperTest.php b/web/modules/custom/ufc/tests/src/Unit/WebScraperTest.php index cc32542..5efe1a4 100644 --- a/web/modules/custom/ufc/tests/src/Unit/WebScraperTest.php +++ b/web/modules/custom/ufc/tests/src/Unit/WebScraperTest.php @@ -20,10 +20,12 @@ public function setUp(): void { } /** - * @dataProvider extractFighterNamesDataProvider + * */ - public function testExtractFighterNames($test_input) { - $this->assertEquals("1", 2, "These do not match."); + public function testGetCurrentFighters() { + $fighters = $this->fighterImporter->getListOfCurrentFighters(); + dump($fighters); + /* $this->assertEquals("1", 2, "These do not match."); */ } } diff --git a/web/themes/custom/dchadwick/css/style.css b/web/themes/custom/dchadwick/css/style.css index e7cb71a..0fd9269 100644 --- a/web/themes/custom/dchadwick/css/style.css +++ b/web/themes/custom/dchadwick/css/style.css @@ -545,6 +545,68 @@ table.cols-5 td.incorrect { right: 34px; } +#block-dchadwick-breadcrumbs { + background: var(--site-gray); +} +#block-dchadwick-breadcrumbs ol { + max-width: 1300px; + margin: 0 50px; + padding: 10px 0; + list-style: none; + display: flex; + gap: 10px; +} +#block-dchadwick-breadcrumbs ol li:not(:last-child):after { + content: "/"; + display: inline-block; + position: relative; + margin-left: 10px; +} +#block-dchadwick-breadcrumbs ol a, #block-dchadwick-breadcrumbs ol li { + color: var(--site-platinum); + font-size: 14px; +} + +.node-type-character .layout--twocol-section { + gap: 20px; +} +.node-type-character .layout--twocol-section .layout__region--first { + flex: 0 1 calc(67% - 20px); +} +.node-type-character .layout--twocol-section .layout__region--first h1 { + margin-bottom: 5px; + background: var(--site-primary); + color: var(--site-platinum); + padding: 0 10px; +} +.node-type-character .layout--twocol-section .layout__region--first h3 { + margin: 0; + font-style: italic; + font-size: 16px; + color: var(--site-gray); + display: inline-block; + padding: 0 10px; +} +.node-type-character .layout--twocol-section .layout__region--second { + flex: 0 1 calc(33% - 20px); + text-align: center; +} +.node-type-character .layout--twocol-section .layout__region--second [class^=field] > div:first-child { + background: var(--site-gray); + color: var(--site-white); + font-size: 18px; + font-weight: 900; + padding: 5px 0; +} +.node-type-character .layout--twocol-section .layout__region--second [class^=field] div:nth-child(2) { + padding: 5px 0; + color: var(--site-gray); +} +.node-type-character .layout__region--first p { + font-size: 18px; + line-height: 24px; +} + html { font-size: 100%; box-sizing: border-box; diff --git a/web/themes/custom/dchadwick/dchadwick.theme b/web/themes/custom/dchadwick/dchadwick.theme index 4ab7c8a..84664a9 100644 --- a/web/themes/custom/dchadwick/dchadwick.theme +++ b/web/themes/custom/dchadwick/dchadwick.theme @@ -16,9 +16,15 @@ function dchadwick_preprocess_node__article(&$vars) { $vars['#attached']['library'] = 'dchadwick/articles'; } +function dchadwick_preprocess_field(&$vars) { + if (isset($vars['field_name'])) { + $vars['attributes']['class'][] = $vars['field_name']; + } +} + function dchadwick_page_attachments_alter(&$page) { // Attach brain.js to all pages? No reason at the moment. - /* $page['#attached']['library'][] = 'dchadwick/brainjs'; */ + $page['#attached']['library'][] = 'dchadwick/brainjs'; } function dchadwick_preprocess_node__fighter(&$vars) { diff --git a/web/themes/custom/dchadwick/js/global.js b/web/themes/custom/dchadwick/js/global.js index bc750f8..529fa4d 100644 --- a/web/themes/custom/dchadwick/js/global.js +++ b/web/themes/custom/dchadwick/js/global.js @@ -2,7 +2,7 @@ document.addEventListener('readystatechange', event => { // When HTML/DOM elements are ready: if (event.target.readyState === "interactive") { //does same as: ..addEventListener("DOMContentLoaded".. highlightFightHistory(); - let train = false; + let train = true; if (train) { setTimeout(() => { trainTheBrain(); @@ -32,9 +32,9 @@ function highlightFightHistory() { function trainTheBrain() { const config = { - iterations: 50000, + iterations: 5000, log: true, - logPeriod: 1000, + logPeriod: 100, binaryThresh: 0.5, hiddenLayers: [40, 20], // array of ints for the sizes of the hidden layers in the network activation: 'sigmoid', // supported activation types: ['sigmoid', 'relu', 'leaky-relu', 'tanh'], diff --git a/web/themes/custom/dchadwick/package-lock.json b/web/themes/custom/dchadwick/package-lock.json index 223727c..87d83a9 100644 --- a/web/themes/custom/dchadwick/package-lock.json +++ b/web/themes/custom/dchadwick/package-lock.json @@ -16,209 +16,7 @@ "gulp": "^4.0.2", "gulp-concat": "^2.6.1", "gulp-sass": "^5.1.0", - "postcss": "^8.4.47", - "tailwindcss": "^3.4.13" - } - }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "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==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "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 - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" + "postcss": "^8.4.47" } }, "node_modules/ansi-colors": { @@ -254,21 +52,6 @@ "node": ">=8" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/ansi-wrap": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", @@ -278,12 +61,6 @@ "node": ">=0.10.0" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true - }, "node_modules/anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -324,12 +101,6 @@ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, "node_modules/arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -766,15 +537,6 @@ "node": ">=0.10.0" } }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001668", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", @@ -961,24 +723,6 @@ "node": ">=0.10.0" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -988,15 +732,6 @@ "color-support": "bin.js" } }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/component-emitter": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", @@ -1067,47 +802,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "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==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/d": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", @@ -1225,18 +919,6 @@ "node": ">=0.10.0" } }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true - }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true - }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -1271,24 +953,12 @@ "node": ">=0.10.0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/electron-to-chromium": { "version": "1.5.36", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz", "integrity": "sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==", "dev": true }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1542,107 +1212,12 @@ "node": ">= 0.10" } }, - "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==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fast-glob/node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-glob/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/fast-glob/node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/fast-glob/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/fast-levenshtein": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", "integrity": "sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==", "dev": true }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -1761,22 +1336,6 @@ "node": ">=0.10.0" } }, - "node_modules/foreground-child": { - "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, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -2504,30 +2063,6 @@ "node": ">=0.10.0" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jiti": { - "version": "1.21.6", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", - "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", - "dev": true, - "bin": { - "jiti": "bin/jiti.js" - } - }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -2629,21 +2164,6 @@ "node": ">=0.10.0" } }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, "node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -2666,12 +2186,6 @@ "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", "dev": true }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - }, "node_modules/make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", @@ -2756,15 +2270,6 @@ "node": ">=0.10.0" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -2847,15 +2352,6 @@ "node": "*" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -2908,17 +2404,6 @@ "node": ">= 0.10" } }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/nan": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", @@ -3074,15 +2559,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -3134,15 +2610,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -3265,12 +2732,6 @@ "node": ">=0.10.0" } }, - "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 - }, "node_modules/parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -3351,15 +2812,6 @@ "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", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -3387,22 +2839,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -3464,15 +2900,6 @@ "node": ">=0.10.0" } }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", @@ -3562,127 +2989,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-load-config": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", - "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "lilconfig": "^3.0.0", - "yaml": "^2.3.4" - }, - "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/postcss-nested": { - "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" - } - ], - "dependencies": { - "postcss-selector-parser": "^6.1.1" - }, - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-selector-parser": { - "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, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -3725,35 +3031,6 @@ "pump": "^2.0.0" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "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" - } - ] - }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "dependencies": { - "pify": "^2.3.0" - } - }, "node_modules/read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -4019,39 +3296,6 @@ "node": ">=0.12" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4284,39 +3528,6 @@ "node": ">=0.10.0" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -4630,30 +3841,6 @@ "node": ">=0.10.0" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/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", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/string-width/node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -4687,19 +3874,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -4712,72 +3886,6 @@ "node": ">=0.10.0" } }, - "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "^10.3.10", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "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, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "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, - "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, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4800,233 +3908,6 @@ "es6-symbol": "^3.1.1" } }, - "node_modules/tailwindcss": { - "version": "3.4.13", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.13.tgz", - "integrity": "sha512-KqjHOJKogOUt5Bs752ykCeiwvi0fKVkr5oqsFNt/8px/tA8scFPIlkygsf6jXrfCqGHz7VflA6+yytWuM+XhFw==", - "dev": true, - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.0", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.21.0", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "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" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tailwindcss/node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tailwindcss/node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tailwindcss/node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tailwindcss/node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/tailwindcss/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, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/tailwindcss/node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tailwindcss/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, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.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, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/tailwindcss/node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tailwindcss/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/tailwindcss/node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/tailwindcss/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/tailwindcss/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -5170,12 +4051,6 @@ "node": ">= 0.10" } }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true - }, "node_modules/type": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", @@ -5526,47 +4401,6 @@ "node": ">=0.10.0" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/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", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -5609,18 +4443,6 @@ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "dev": true }, - "node_modules/yaml": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", - "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", - "dev": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/yargs": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", diff --git a/web/themes/custom/dchadwick/package.json b/web/themes/custom/dchadwick/package.json index f6a971f..a9e1055 100644 --- a/web/themes/custom/dchadwick/package.json +++ b/web/themes/custom/dchadwick/package.json @@ -15,8 +15,7 @@ "gulp": "^4.0.2", "gulp-concat": "^2.6.1", "gulp-sass": "^5.1.0", - "postcss": "^8.4.47", - "tailwindcss": "^3.4.13" + "postcss": "^8.4.47" }, "dependencies": { "sass": "^1.71.1" diff --git a/web/themes/custom/dchadwick/src/sass/partials/breadcrumbs.scss b/web/themes/custom/dchadwick/src/sass/partials/breadcrumbs.scss new file mode 100644 index 0000000..ecb6b88 --- /dev/null +++ b/web/themes/custom/dchadwick/src/sass/partials/breadcrumbs.scss @@ -0,0 +1,27 @@ +#block-dchadwick-breadcrumbs { + background: var(--site-gray); + + ol { + max-width: 1300px; + margin: 0 50px; + padding: 10px 0; + list-style: none; + display: flex; + gap: 10px; + + li:not(:last-child) { + &:after { + content: "/"; + display: inline-block; + position: relative; + margin-left: 10px; + } + } + + a,li { + color: var(--site-platinum); + font-size: 14px; + } + } + +} diff --git a/web/themes/custom/dchadwick/src/sass/partials/characters.scss b/web/themes/custom/dchadwick/src/sass/partials/characters.scss new file mode 100644 index 0000000..b9b6dbd --- /dev/null +++ b/web/themes/custom/dchadwick/src/sass/partials/characters.scss @@ -0,0 +1,52 @@ +.node-type-character { + + .layout--twocol-section { + gap: 20px; + + .layout__region--first { + flex: 0 1 calc(67% - 20px); + + h1 { + margin-bottom: 5px; + background: var(--site-primary); + color: var(--site-platinum); + padding: 0 10px; + } + + h3 { + margin: 0; + font-style: italic; + font-size: 16px; + color: var(--site-gray); + display: inline-block; + padding: 0 10px; + } + } + + .layout__region--second { + flex: 0 1 calc(33% - 20px); + text-align: center; + + [class^=field] { + > div:first-child { + background: var(--site-gray); + color: var(--site-white); + font-size: 18px; + font-weight: 900; + padding: 5px 0; + } + div:nth-child(2) { + padding: 5px 0; + color: var(--site-gray); + } + } + } + + } + + + .layout__region--first p { + font-size: 18px; + line-height: 24px; + } +} diff --git a/web/themes/custom/dchadwick/src/sass/style.scss b/web/themes/custom/dchadwick/src/sass/style.scss index e879587..032371c 100644 --- a/web/themes/custom/dchadwick/src/sass/style.scss +++ b/web/themes/custom/dchadwick/src/sass/style.scss @@ -51,6 +51,8 @@ $container-plus-padding: 1216px; @import "partials/fight"; @import "partials/event"; @import "partials/article"; +@import "partials/breadcrumbs"; +@import "partials/characters"; html { font-size: 100%; diff --git a/web/themes/custom/dchadwick/templates/field/field--field-character-image.html.twig b/web/themes/custom/dchadwick/templates/field/field--field-character-image.html.twig new file mode 100644 index 0000000..21536f1 --- /dev/null +++ b/web/themes/custom/dchadwick/templates/field/field--field-character-image.html.twig @@ -0,0 +1,10 @@ +{% + set title_classes = [ + label_display == 'visually_hidden' ? 'visually-hidden', + ] +%} + + {% for item in items %} + + {% endfor %} + diff --git a/web/themes/custom/dchadwick/templates/field/field--field-youtube-url.html.twig b/web/themes/custom/dchadwick/templates/field/field--field-youtube-url.html.twig new file mode 100644 index 0000000..8ed8379 --- /dev/null +++ b/web/themes/custom/dchadwick/templates/field/field--field-youtube-url.html.twig @@ -0,0 +1,10 @@ +{% + set title_classes = [ + label_display == 'visually_hidden' ? 'visually-hidden', + ] +%} + + {% for item in items %} + + {% endfor %} +