diff --git a/.env.example b/.env.example index 6fcc227e2..2a87ecdaa 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,9 @@ COMPOSE_PROJECT_NAME=dpl-cms COMPOSER_MEMORY_LIMIT=-1 + +# GraphQL Consumer environment variables used for local development +GRAPHQL_CONSUMER_SECRET=some-secret + #OPENID_CLIENT_ID=some-client-id #OPENID_CLIENT_SECRET=some-client-secret #OPENID_AGENCY_ID=some-agency-id diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..cccbb6fcb --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,16 @@ +{ + "printWidth": 80, + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "overrides": [ + { + "files": ["*.css"], + "options": { + "parser": "css", + "printWidth": 10000, + "singleQuote": false + } + } + ] +} diff --git a/Taskfile.yml b/Taskfile.yml index 401ab912e..6f4a7f0c8 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -86,8 +86,10 @@ tasks: dev:build: summary: Build docker containers # Ensure that we only rebuild if there are changes to Dockerfiles + # or the config files used. sources: - - "{{ .LAGOON_DIR }}/*.dockerfile" + - "{{ .LAGOON_DIR }}/**/*" + - "{{ .LAGOON_DIR }}/*" cmds: - docker compose build @@ -382,6 +384,16 @@ tasks: cmds: - cmd: task dev:cli -- drush default-content:export-module dpl_example_content + dev:go:set-graphql-secret: + desc: Sets the GraphQL consumer secret based on the .env variable. + cmds: + - cmd: task dev:cli -- drush dpl_consumers:set-consumer-secret + + dev:go:graphql-credentials: + desc: Get the GraphQL consumer credentials + cmds: + - cmd: task dev:cli -- drush dpl_consumers:consumer-credentials + ci:reset: desc: Create CI setup in a clean state cmds: diff --git a/assets/all.settings.php b/assets/all.settings.php index 78cefc5b6..f5b1e5cbd 100644 --- a/assets/all.settings.php +++ b/assets/all.settings.php @@ -56,6 +56,21 @@ // advanced security measure: '../config/sync'. $settings['config_sync_directory'] = '../config/sync'; +/** + * Private file path. + * + * A local file system path where private files will be stored. This directory + * must be absolute, outside the Drupal installation directory and not + * accessible over the web. + * + * Note: Caches need to be cleared when this value is changed to make the + * private:// stream wrapper available to the system. + * + * See https://www.drupal.org/documentation/modules/file for more information + * about securing private files. + */ +$settings['file_private_path'] = $app_root . '/sites/default/files/private'; + // Set service base urls for the react apps. $config['dpl_react_apps.settings']['services'] = [ 'cover' => ['base_url' => 'https://cover.dandigbib.org'], diff --git a/composer.json b/composer.json index 2a39a6641..770f9919c 100644 --- a/composer.json +++ b/composer.json @@ -40,10 +40,10 @@ "type": "package", "package": { "name": "danskernesdigitalebibliotek/dpl-react", - "version": "2024.47.0", + "version": "2024.48.0", "type": "drupal-library", "dist": { - "url": "https://github.com/danskernesdigitalebibliotek/dpl-react/releases/download/2024.47.0/dist-2024-47-0-d262e234fe972eeb86cc0e21d663245a3a96331a.zip", + "url": "https://github.com/danskernesdigitalebibliotek/dpl-react/releases/download/2024.48.0/dist-2024-48-0-6f62c8848cc77c7b83fa3c2591ec0dd2e345a2d3.zip", "type": "zip" }, "require": { @@ -56,9 +56,9 @@ "package": { "name": "danskernesdigitalebibliotek/dpl-design-system", "type": "drupal-library", - "version": "2024.47.1", + "version": "2024.48.0", "dist": { - "url": "https://github.com/danskernesdigitalebibliotek/dpl-design-system/releases/download/2024.47.1/dist-2024-47-1-acd61eab1fefee5ed1bc3da76b31c9640caa8671.zip", + "url": "https://github.com/danskernesdigitalebibliotek/dpl-design-system/releases/download/2024.48.0/dist-2024-48-0-41958fd47476e2ba316c4529ce2f0ae3e31dd1e4.zip", "type": "zip" } } @@ -90,8 +90,8 @@ "composer/installers": "1.12.0", "cweagans/composer-patches": "1.7.3", "danskernesdigitalebibliotek/cms-api": "*", - "danskernesdigitalebibliotek/dpl-design-system": "2024.47.1", - "danskernesdigitalebibliotek/dpl-react": "2024.47.0", + "danskernesdigitalebibliotek/dpl-design-system": "2024.48.0", + "danskernesdigitalebibliotek/dpl-react": "2024.48.0", "danskernesdigitalebibliotek/fbs-client": "*", "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", "deoliveiralucas/array-keys-case-transform": "^1.1", @@ -110,9 +110,9 @@ "drupal/consumers": "^1.19", "drupal/content_lock": "^2.3", "drupal/cookieinformation": "^2.1", - "drupal/core-composer-scaffold": "10.3.9", - "drupal/core-project-message": "10.3.9", - "drupal/core-recommended": "10.3.9", + "drupal/core-composer-scaffold": "10.3.10", + "drupal/core-project-message": "10.3.10", + "drupal/core-recommended": "10.3.10", "drupal/date_range_formatter": "^4.0", "drupal/default_content": "^2.0@alpha", "drupal/devel": "^5.1", @@ -164,6 +164,7 @@ "drupal/select2_multicheck": "^1.0", "drupal/selective_better_exposed_filters": "^3.0", "drupal/simple_menu_permissions": "^2.0", + "drupal/simple_oauth": "^5.2", "drupal/taxonomy_unique": "^2.5", "drupal/telephone_formatter": "^1.2", "drupal/theme_permission": "^2.0", @@ -224,8 +225,8 @@ }, "scripts": { "post-drupal-scaffold-cmd": [ - "[[ ! -d /app/web/sites/default/files/modules_local ]] && mkdir -p /app/web/sites/default/files/modules_local || exit 0", - "[[ ! -L /app/web/modules/local ]] && ln -s /app/web/sites/default/files/modules_local /app/web/modules/local || exit 0" + "[ ! -d web/sites/default/files/modules_local ] && mkdir -p web/sites/default/files/modules_local || exit 0", + "[ ! -L web/modules/local ] && ln -s web/sites/default/files/modules_local web/modules/local || exit 0" ] }, "extra": { @@ -297,10 +298,10 @@ "Add item count and url page parameter": "patches/add-item-count-views_infinite_scroll.patch" }, "drupal/core": { - "Configure core to not check permissions before accepting an updated module": "patches/disable-core-upload-permission-check.diff", "2280639: Add the FieldStorageDefinition class to define field storage definitions in hook_entity_field_storage_info()": "https://www.drupal.org/files/issues/2023-09-05/2280639-d10-reroll-156.patch", "3402656: Toolbar causes a Javascript error if the subtrees content changes between page loads": "https://git.drupalcode.org/issue/drupal-3402656/-/commit/61ac007a84014f54a07825f8f92bb6bc0dfbd170.patch", "3035578: Add details for AJAX response errors": "https://www.drupal.org/files/issues/2023-07-24/3035578-26.patch", + "3293926: Error decorating non-existent service when inner service's module not installed": "https://git.drupalcode.org/project/drupal/-/commit/a64662a3cea209c106b888ce9ef03cc1808f9ffe.patch", "Always assume chmod succeeds": "patches/core-chmod-true.patch", "Debug Form triggering element detection": "patches/form-triggering-element-detection-paragraphs-ee.patch" }, @@ -339,6 +340,9 @@ "drupal/jsonlog": { "3251587: Change logging from stdout to stderr": "https://www.drupal.org/files/issues/2021-11-29/jsonlog-change-stdout-to-stderr-3251587-3.patch" }, + "drupal/openapi": { + "3480050: Update oauth2 security definitions to match openapi v2 specification": "https://www.drupal.org/files/issues/2024-10-11/openapi-add-oauth2-accesscode-flow-3480050-3.patch" + }, "drupal/openapi_rest": { "3171530 + 3116760: Add support for parameter and response descriptions": "patches/openapi-parameter-response-descriptions-14-3.patch", "3343816: Specification includes disabled resources": "https://git.drupalcode.org/project/openapi_rest/-/commit/6618157334feca93fad1041583375eed660b9085.patch" diff --git a/composer.lock b/composer.lock index f9b41c088..59b54a721 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": "99274bdfc42bd8d1d9a67bdf54830939", + "content-hash": "6571567cbfd8156aa48a70c4c24581b6", "packages": [ { "name": "amazeeio/drupal_integrations", @@ -1166,19 +1166,19 @@ }, { "name": "danskernesdigitalebibliotek/dpl-design-system", - "version": "2024.47.1", + "version": "2024.48.0", "dist": { "type": "zip", - "url": "https://github.com/danskernesdigitalebibliotek/dpl-design-system/releases/download/2024.47.1/dist-2024-47-1-acd61eab1fefee5ed1bc3da76b31c9640caa8671.zip" + "url": "https://github.com/danskernesdigitalebibliotek/dpl-design-system/releases/download/2024.48.0/dist-2024-48-0-41958fd47476e2ba316c4529ce2f0ae3e31dd1e4.zip" }, "type": "drupal-library" }, { "name": "danskernesdigitalebibliotek/dpl-react", - "version": "2024.47.0", + "version": "2024.48.0", "dist": { "type": "zip", - "url": "https://github.com/danskernesdigitalebibliotek/dpl-react/releases/download/2024.47.0/dist-2024-47-0-d262e234fe972eeb86cc0e21d663245a3a96331a.zip" + "url": "https://github.com/danskernesdigitalebibliotek/dpl-react/releases/download/2024.48.0/dist-2024-48-0-6f62c8848cc77c7b83fa3c2591ec0dd2e345a2d3.zip" }, "require": { "composer/installers": "^1.2.0" @@ -1318,6 +1318,73 @@ }, "time": "2023-01-05T11:28:13+00:00" }, + { + "name": "defuse/php-encryption", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/f53396c2d34225064647a05ca76c1da9d99e5828", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "paragonie/random_compat": ">= 2", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", + "yoast/phpunit-polyfills": "^2.0.0" + }, + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ], + "support": { + "issues": "https://github.com/defuse/php-encryption/issues", + "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" + }, + "time": "2023-06-19T06:10:36+00:00" + }, { "name": "dekor/php-array-table", "version": "2.0", @@ -2866,27 +2933,32 @@ }, { "name": "drupal/config_ignore_auto", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://git.drupalcode.org/project/config_ignore_auto.git", - "reference": "3.0.2" + "reference": "3.0.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/config_ignore_auto-3.0.2.zip", - "reference": "3.0.2", - "shasum": "a9e2156e11a08c505d743aaa5904ec52379661b1" + "url": "https://ftp.drupal.org/files/projects/config_ignore_auto-3.0.3.zip", + "reference": "3.0.3", + "shasum": "dd6c372d2ee2405473db4dc7f220ccbbaa82d8eb" }, "require": { "drupal/config_ignore": "^3.0", - "drupal/core": "^8.8 || ^9 || ^10" + "drupal/core": "^8.8 || ^9 || ^10 || ^11" + }, + "require-dev": { + "drupal/admin_toolbar": "^3.5", + "drupal/devel": "^5.3", + "drush/drush": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.2", - "datestamp": "1705680181", + "version": "3.0.3", + "datestamp": "1728397967", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -2899,18 +2971,20 @@ ], "authors": [ { - "name": "hanoii", - "homepage": "https://www.drupal.org/user/23157" + "name": "Ariel Barreiro (hanoii)", + "homepage": "https://www.drupal.org/u/hanoii", + "role": "Maintainer" }, { "name": "spencerbrooks", "homepage": "https://www.drupal.org/user/400066" } ], - "description": "Automatically ignore configs that were modified.", - "homepage": "https://www.drupal.org/project/config_ignore_auto", + "description": "A description", + "homepage": "https://drupal.org/project/config_ignore_auto", "support": { - "source": "https://git.drupalcode.org/project/config_ignore_auto" + "source": "https://git.drupalcode.org/project/config_ignore_auto", + "issues": "https://drupal.org/project/issues/config_ignore_auto" } }, { @@ -3220,16 +3294,16 @@ }, { "name": "drupal/core", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd" + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/42a6516491b4793158542a2326dc6ad1fe2aa5bd", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd", + "url": "https://api.github.com/repos/drupal/core/zipball/3ebb71e9c4ef0c13f683353547551fca49f9a144", + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144", "shasum": "" }, "require": { @@ -3378,13 +3452,13 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/10.3.9" + "source": "https://github.com/drupal/core/tree/10.3.10" }, - "time": "2024-11-20T17:59:45+00:00" + "time": "2024-11-22T12:51:33+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -3428,13 +3502,13 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.9" + "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.10" }, "time": "2024-08-22T14:31:34+00:00" }, { "name": "drupal/core-project-message", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", @@ -3475,16 +3549,16 @@ }, { "name": "drupal/core-recommended", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "03da2860a10c12b86714e778178433b620bb890d" + "reference": "1d739e569c9324bcac1ecc7be600d414386a399b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/03da2860a10c12b86714e778178433b620bb890d", - "reference": "03da2860a10c12b86714e778178433b620bb890d", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/1d739e569c9324bcac1ecc7be600d414386a399b", + "reference": "1d739e569c9324bcac1ecc7be600d414386a399b", "shasum": "" }, "require": { @@ -3493,7 +3567,7 @@ "doctrine/annotations": "~1.14.3", "doctrine/deprecations": "~1.1.3", "doctrine/lexer": "~2.1.1", - "drupal/core": "10.3.9", + "drupal/core": "10.3.10", "egulias/email-validator": "~4.0.2", "guzzlehttp/guzzle": "~7.8.1", "guzzlehttp/promises": "~2.0.2", @@ -3554,9 +3628,9 @@ ], "description": "Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/10.3.9" + "source": "https://github.com/drupal/core-recommended/tree/10.3.10" }, - "time": "2024-11-20T17:59:45+00:00" + "time": "2024-11-22T12:51:33+00:00" }, { "name": "drupal/crop", @@ -5736,26 +5810,26 @@ }, { "name": "drupal/media_library_edit", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://git.drupalcode.org/project/media_library_edit.git", - "reference": "3.0.3" + "reference": "3.0.4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/media_library_edit-3.0.3.zip", - "reference": "3.0.3", - "shasum": "f5d28e121bc2f21762d446553d61d48151d1b391" + "url": "https://ftp.drupal.org/files/projects/media_library_edit-3.0.4.zip", + "reference": "3.0.4", + "shasum": "92f1c1f58b5579363a9f18ffb5632cc368066dfe" }, "require": { - "drupal/core": "^8 || ^9 || ^10" + "drupal/core": "^9.2 || ^10 || ^11" }, "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.3", - "datestamp": "1706394959", + "version": "3.0.4", + "datestamp": "1724358009", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7494,6 +7568,75 @@ "source": "https://git.drupalcode.org/project/simple_menu_permissions" } }, + { + "name": "drupal/simple_oauth", + "version": "5.2.5", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/simple_oauth.git", + "reference": "5.2.5" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/simple_oauth-5.2.5.zip", + "reference": "5.2.5", + "shasum": "3517d07e4896a32eddda7446b85a2afa945321a2" + }, + "require": { + "drupal/consumers": "^1.14", + "drupal/core": "^9 || ^10", + "lcobucci/jwt": "^4", + "league/oauth2-server": "^8.3", + "php": ">=7.4", + "steverhoades/oauth2-openid-connect-server": "^2.4" + }, + "require-dev": { + "phpspec/prophecy-phpunit": "^2" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "5.2.5", + "datestamp": "1700206902", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9 || ^10 || ^11" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "bojan_dev", + "homepage": "https://www.drupal.org/user/2801849" + }, + { + "name": "bradjones1", + "homepage": "https://www.drupal.org/user/405824" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "pcambra", + "homepage": "https://www.drupal.org/user/122101" + } + ], + "description": "The Simple OAuth module for Drupal", + "homepage": "https://www.drupal.org/project/simple_oauth", + "support": { + "source": "https://git.drupalcode.org/project/simple_oauth" + } + }, { "name": "drupal/taxonomy_unique", "version": "2.6.0", @@ -9392,6 +9535,144 @@ ], "time": "2022-09-13T19:27:18+00:00" }, + { + "name": "lcobucci/clock", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/clock.git", + "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", + "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", + "shasum": "" + }, + "require": { + "php": "~8.1.0 || ~8.2.0", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "infection/infection": "^0.26", + "lcobucci/coding-standard": "^9.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.27" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com" + } + ], + "description": "Yet another clock abstraction", + "support": { + "issues": "https://github.com/lcobucci/clock/issues", + "source": "https://github.com/lcobucci/clock/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2022-12-19T15:00:24+00:00" + }, + { + "name": "lcobucci/jwt", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-sodium": "*", + "lcobucci/clock": "^2.0 || ^3.0", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "infection/infection": "^0.21", + "lcobucci/coding-standard": "^6.0", + "mikey179/vfsstream": "^1.6.7", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/php-invoker": "^3.1", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "support": { + "issues": "https://github.com/lcobucci/jwt/issues", + "source": "https://github.com/lcobucci/jwt/tree/4.3.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2023-01-02T13:28:00+00:00" + }, { "name": "league/container", "version": "4.2.2", @@ -9474,6 +9755,322 @@ ], "time": "2024-03-13T13:12:53+00:00" }, + { + "name": "league/event", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/event.git", + "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/event/zipball/d2cc124cf9a3fab2bb4ff963307f60361ce4d119", + "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Event\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Event package", + "keywords": [ + "emitter", + "event", + "listener" + ], + "support": { + "issues": "https://github.com/thephpleague/event/issues", + "source": "https://github.com/thephpleague/event/tree/master" + }, + "time": "2018-11-26T11:52:41+00:00" + }, + { + "name": "league/oauth2-server", + "version": "8.5.4", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth2-server.git", + "reference": "ab7714d073844497fd222d5d0a217629089936bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/ab7714d073844497fd222d5d0a217629089936bc", + "reference": "ab7714d073844497fd222d5d0a217629089936bc", + "shasum": "" + }, + "require": { + "defuse/php-encryption": "^2.3", + "ext-openssl": "*", + "lcobucci/clock": "^2.2 || ^3.0", + "lcobucci/jwt": "^4.3 || ^5.0", + "league/event": "^2.2", + "league/uri": "^6.7 || ^7.0", + "php": "^8.0", + "psr/http-message": "^1.0.1 || ^2.0" + }, + "replace": { + "league/oauth2server": "*", + "lncd/oauth2": "*" + }, + "require-dev": { + "laminas/laminas-diactoros": "^3.0.0", + "phpstan/phpstan": "^0.12.57", + "phpstan/phpstan-phpunit": "^0.12.16", + "phpunit/phpunit": "^9.6.6", + "roave/security-advisories": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\OAuth2\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Bilbie", + "email": "hello@alexbilbie.com", + "homepage": "http://www.alexbilbie.com", + "role": "Developer" + }, + { + "name": "Andy Millington", + "email": "andrew@noexceptions.io", + "homepage": "https://www.noexceptions.io", + "role": "Developer" + } + ], + "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", + "homepage": "https://oauth2.thephpleague.com/", + "keywords": [ + "Authentication", + "api", + "auth", + "authorisation", + "authorization", + "oauth", + "oauth 2", + "oauth 2.0", + "oauth2", + "protect", + "resource", + "secure", + "server" + ], + "support": { + "issues": "https://github.com/thephpleague/oauth2-server/issues", + "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.4" + }, + "funding": [ + { + "url": "https://github.com/sephster", + "type": "github" + } + ], + "time": "2023-08-25T22:35:12+00:00" + }, + { + "name": "league/uri", + "version": "7.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.3", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.4.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-03-23T07:42:40+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-03-23T07:42:40+00:00" + }, { "name": "masterminds/html5", "version": "2.9.0", @@ -9982,6 +10579,56 @@ }, "time": "2021-12-15T12:32:42+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, { "name": "pear/archive_tar", "version": "1.5.0", @@ -10105,16 +10752,16 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.15", + "version": "v1.10.16", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c" + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/ce0adade8b97561656ace07cdaac4751c271ea8c", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/c0f51b45f50683bf5bbf558036854ebc9b54d033", + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033", "shasum": "" }, "require": { @@ -10150,7 +10797,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2024-03-16T18:41:45+00:00" + "time": "2024-11-24T22:27:58+00:00" }, { "name": "pear/pear_exception", @@ -10781,6 +11428,54 @@ }, "time": "2021-02-03T23:26:27+00:00" }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -11422,6 +12117,51 @@ ], "time": "2024-05-22T21:24:41+00:00" }, + { + "name": "steverhoades/oauth2-openid-connect-server", + "version": "v2.6.1", + "source": { + "type": "git", + "url": "https://github.com/steverhoades/oauth2-openid-connect-server.git", + "reference": "269c4dc071519e8220e249cbdee9b0723e95215e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/steverhoades/oauth2-openid-connect-server/zipball/269c4dc071519e8220e249cbdee9b0723e95215e", + "reference": "269c4dc071519e8220e249cbdee9b0723e95215e", + "shasum": "" + }, + "require": { + "lcobucci/jwt": "4.1.5|^4.2|^4.3|^5.0", + "league/oauth2-server": "^5.1|^6.0|^7.0|^8.0" + }, + "require-dev": { + "laminas/laminas-diactoros": "^1.3.2", + "phpunit/phpunit": "^5.0|^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "OpenIDConnectServer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Steve Rhoades", + "email": "sedonami@gmail.com" + } + ], + "description": "An OpenID Connect Server that sites on The PHP League's OAuth2 Server", + "support": { + "issues": "https://github.com/steverhoades/oauth2-openid-connect-server/issues", + "source": "https://github.com/steverhoades/oauth2-openid-connect-server/tree/v2.6.1" + }, + "time": "2023-09-08T16:15:47+00:00" + }, { "name": "swagger-api/swagger-ui", "version": "v3.52.5", @@ -16862,16 +17602,16 @@ }, { "name": "phpspec/prophecy-phpunit", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "16e1247e139434bce0bac09848bc5c8d882940fc" + "reference": "8819516c1b489ecee4c60db5f5432fac1ea8ac6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/16e1247e139434bce0bac09848bc5c8d882940fc", - "reference": "16e1247e139434bce0bac09848bc5c8d882940fc", + "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/8819516c1b489ecee4c60db5f5432fac1ea8ac6f", + "reference": "8819516c1b489ecee4c60db5f5432fac1ea8ac6f", "shasum": "" }, "require": { @@ -16879,6 +17619,9 @@ "phpspec/prophecy": "^1.18", "phpunit/phpunit": "^9.1 || ^10.1 || ^11.0" }, + "require-dev": { + "phpstan/phpstan": "^1.10" + }, "type": "library", "extra": { "branch-alias": { @@ -16908,9 +17651,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.2.0" + "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.3.0" }, - "time": "2024-03-01T08:33:58+00:00" + "time": "2024-11-19T13:24:17+00:00" }, { "name": "phpstan/extension-installer", diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 05b38ff21..f9cfe5e8b 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -14,7 +14,6 @@ module: ckeditor5: 0 collation_fixer: 0 color_field: 0 - config_filter: 0 config_ignore: 0 config_ignore_auto: 0 config_perms: 0 @@ -81,6 +80,7 @@ module: dpl_update: 0 dpl_url_proxy: 0 dpl_webform: 0 + dpl_webmaster: 0 drupal_typed: 0 dynamic_entity_reference: 0 dynamic_page_cache: 0 @@ -163,6 +163,7 @@ module: select2: 0 serialization: 0 simple_menu_permissions: 0 + simple_oauth: 0 system: 0 taxonomy: 0 taxonomy_unique: 0 diff --git a/config/sync/field.field.paragraph.card_grid_manual.field_grid_content.yml b/config/sync/field.field.paragraph.card_grid_manual.field_grid_content.yml index 8d60e4852..6fac6280a 100644 --- a/config/sync/field.field.paragraph.card_grid_manual.field_grid_content.yml +++ b/config/sync/field.field.paragraph.card_grid_manual.field_grid_content.yml @@ -71,4 +71,7 @@ settings: consumer: handler: 'default:consumer' handler_settings: { } + oauth2_token: + handler: 'default:oauth2_token' + handler_settings: { } field_type: dynamic_entity_reference diff --git a/config/sync/field.field.paragraph.content_slider.field_content_references.yml b/config/sync/field.field.paragraph.content_slider.field_content_references.yml index 48e6d9360..15e631c45 100644 --- a/config/sync/field.field.paragraph.content_slider.field_content_references.yml +++ b/config/sync/field.field.paragraph.content_slider.field_content_references.yml @@ -78,4 +78,7 @@ settings: consumer: handler: 'default:consumer' handler_settings: { } + oauth2_token: + handler: 'default:oauth2_token' + handler_settings: { } field_type: dynamic_entity_reference diff --git a/config/sync/field.field.paragraph.nav_grid_manual.field_content_references.yml b/config/sync/field.field.paragraph.nav_grid_manual.field_content_references.yml index 99215cdb4..51c451567 100644 --- a/config/sync/field.field.paragraph.nav_grid_manual.field_content_references.yml +++ b/config/sync/field.field.paragraph.nav_grid_manual.field_content_references.yml @@ -74,4 +74,7 @@ settings: consumer: handler: 'default:consumer' handler_settings: { } + oauth2_token: + handler: 'default:oauth2_token' + handler_settings: { } field_type: dynamic_entity_reference diff --git a/config/sync/field.field.paragraph.nav_spots_manual.field_nav_spots_content.yml b/config/sync/field.field.paragraph.nav_spots_manual.field_nav_spots_content.yml index 0b76357b5..5e86e0fdc 100644 --- a/config/sync/field.field.paragraph.nav_spots_manual.field_nav_spots_content.yml +++ b/config/sync/field.field.paragraph.nav_spots_manual.field_nav_spots_content.yml @@ -74,4 +74,7 @@ settings: consumer: handler: 'default:consumer' handler_settings: { } + oauth2_token: + handler: 'default:oauth2_token' + handler_settings: { } field_type: dynamic_entity_reference diff --git a/config/sync/simple_oauth.oauth2_token.bundle.access_token.yml b/config/sync/simple_oauth.oauth2_token.bundle.access_token.yml new file mode 100644 index 000000000..76c2bf2d7 --- /dev/null +++ b/config/sync/simple_oauth.oauth2_token.bundle.access_token.yml @@ -0,0 +1,10 @@ +uuid: 0bc530d9-c2bd-4bda-bffe-f2cea1b4849d +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: z9ULI9nj9yt73YKI3ZE8v9yXhkVfvQsDJToEDzijcxY +id: access_token +label: 'Access Token' +description: 'The access token type.' +locked: true diff --git a/config/sync/simple_oauth.oauth2_token.bundle.auth_code.yml b/config/sync/simple_oauth.oauth2_token.bundle.auth_code.yml new file mode 100644 index 000000000..386b171ff --- /dev/null +++ b/config/sync/simple_oauth.oauth2_token.bundle.auth_code.yml @@ -0,0 +1,10 @@ +uuid: 71063e70-4de3-4ddf-8931-ba4160365f23 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: zYKaSl4QZrKMFj7aIhSGDRcBy4SoNjvY2EZlT7amrBk +id: auth_code +label: 'Auth code' +description: 'The auth code type.' +locked: true diff --git a/config/sync/simple_oauth.oauth2_token.bundle.refresh_token.yml b/config/sync/simple_oauth.oauth2_token.bundle.refresh_token.yml new file mode 100644 index 000000000..56c388423 --- /dev/null +++ b/config/sync/simple_oauth.oauth2_token.bundle.refresh_token.yml @@ -0,0 +1,10 @@ +uuid: 83f9de1a-dae6-4609-8026-0f2990b9c7f7 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: YWMv3Do9fsPFhylyFkOwcqcFP4jSU6DLRootOlgrC0M +id: refresh_token +label: 'Refresh token' +description: 'The refresh token type.' +locked: true diff --git a/config/sync/simple_oauth.settings.yml b/config/sync/simple_oauth.settings.yml new file mode 100644 index 000000000..530f0859f --- /dev/null +++ b/config/sync/simple_oauth.settings.yml @@ -0,0 +1,11 @@ +_core: + default_config_hash: KsPFWSp6mgXIQgjBJEShfKUGn6VLRlbpIJ2EysXvXWM +access_token_expiration: 300 +authorization_code_expiration: 300 +refresh_token_expiration: 1209600 +token_cron_batch_size: 0 +public_key: ../web/sites/default/files/private/simple_oauth_keys/public.key +private_key: ../web/sites/default/files/private/simple_oauth_keys/private.key +remember_clients: true +use_implicit: false +disable_openid_connect: false diff --git a/cypress.config.js b/cypress.config.js index adc3988a0..c4ef187b0 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -4,6 +4,10 @@ module.exports = defineConfig({ e2e: { // baseUrl is set using environment variables because it differs between // development and CI setups. + retries: { + runMode: 3, + openMode: 0, + }, }, env: { // This is intentionally left empty. diff --git a/cypress/e2e/adgangsplatformen.cy.ts b/cypress/e2e/adgangsplatformen.cy.ts index 6d802a855..57aa9f2a8 100644 --- a/cypress/e2e/adgangsplatformen.cy.ts +++ b/cypress/e2e/adgangsplatformen.cy.ts @@ -1,12 +1,12 @@ -describe("Adgangsplatformen", () => { +describe('Adgangsplatformen', () => { beforeEach(() => { Cypress.session.clearAllSavedSessions(); }); - it("supports login with both uniqueId and CPR attribute", () => { - const authorizationCode = "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc"; - const accessToken = "447131b0a03fe0421204c54e5c21a60d70030fd1"; - const userGuid = "19a4ae39-be07-4db9-a8b7-8bbb29f03da6"; + it('supports login with both uniqueId and CPR attribute', () => { + const authorizationCode = '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc'; + const accessToken = '447131b0a03fe0421204c54e5c21a60d70030fd1'; + const userGuid = '19a4ae39-be07-4db9-a8b7-8bbb29f03da6'; const userCPR = 9999999999; cy.adgangsplatformenLogin({ @@ -15,14 +15,14 @@ describe("Adgangsplatformen", () => { userCPR, userGuid, }); - cy.visit("/user"); - cy.url().should("match", /user\/\d+/); + cy.visit('/user'); + cy.url().should('match', /user\/\d+/); }); - it("supports login for user with only CPR attribute.", () => { + it('supports login for user with only CPR attribute.', () => { // If a user does not have uniqueId attribute, it is a user not previously related to any library. - const authorizationCode = "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc"; - const accessToken = "447131b0a03fe0421204c54e5c21a60-new-user"; + const authorizationCode = '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc'; + const accessToken = '447131b0a03fe0421204c54e5c21a60-new-user'; const userCPR = 9999999999; cy.adgangsplatformenLogin({ @@ -30,135 +30,135 @@ describe("Adgangsplatformen", () => { accessToken, userCPR, }); - cy.visit("/user"); - cy.url().should("match", /user\/\d+/); + cy.visit('/user'); + cy.url().should('match', /user\/\d+/); }); - it("supports login for user only with uniqueId attribute.", () => { + it('supports login for user only with uniqueId attribute.', () => { // If a user do not have a CPR attribute, it is probably a test user. - const authorizationCode = "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc"; - const accessToken = "447131b0a03fe0421204c54e5c21a60-new-user"; - const userGuid = "19a4ae39-be07-4db9-a8b7-8bbb29f03da6"; + const authorizationCode = '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc'; + const accessToken = '447131b0a03fe0421204c54e5c21a60-new-user'; + const userGuid = '19a4ae39-be07-4db9-a8b7-8bbb29f03da6'; cy.adgangsplatformenLogin({ authorizationCode, accessToken, userGuid, }); - cy.visit("/user"); - cy.url().should("match", /user\/\d+/); + cy.visit('/user'); + cy.url().should('match', /user\/\d+/); }); // TODO: Figure out how to check failed logins when using cy.session(). - it.skip("does not support login with users missing both uniqueId and CPR attribute.", () => { + it.skip('does not support login with users missing both uniqueId and CPR attribute.', () => { // If a user do not have a CPR attribute, it is probably a test user. - const authorizationCode = "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc"; - const accessToken = "447131b0a03fe0421204c54e5c21a60-new-user"; + const authorizationCode = '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc'; + const accessToken = '447131b0a03fe0421204c54e5c21a60-new-user'; cy.adgangsplatformenLogin({ authorizationCode, accessToken, }); cy.contains( - "body", - "The website encountered an unexpected error. Please try again later." + 'body', + 'The website encountered an unexpected error. Please try again later.', ); }); // When a user comes back from authentication with MitID, the user should // not be able to do anything else other than registering or cancelling. // Check that the header and footer sections is not vissible. - it("does not show header and footer section for unregistered user", () => { + it('does not show header and footer section for unregistered user', () => { cy.setupAdgangsplatformenRegisterMappinngs({ - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc", - accessToken: "447131b0a03fe0421204c54e5c21a60-new-user", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc', + accessToken: '447131b0a03fe0421204c54e5c21a60-new-user', userCPR: 1412749999, }); cy.clearCookies(); - cy.visit("/arrangementer"); + cy.visit('/arrangementer'); // Open user menu. - cy.getBySel("header-menu-profile-button").click(); + cy.getBySel('header-menu-profile-button').click(); // Click create profile. - cy.get(".modal-login__btn-create-profile").click(); - cy.get("main#main-content") - .get(".paragraphs__item--user_registration_section__link") + cy.get('.modal-login__btn-create-profile').click(); + cy.get('main#main-content') + .get('.paragraphs__item--user_registration_section__link') .first() .click(); cy.verifyToken({ - tokenType: "unregistered-user", - token: "447131b0a03fe0421204c54e5c21a60-new-user", + tokenType: 'unregistered-user', + token: '447131b0a03fe0421204c54e5c21a60-new-user', }); - cy.get(".header").should("not.exist"); - cy.get(".footer").should("not.exist"); + cy.get('.header').should('not.exist'); + cy.get('.footer').should('not.exist'); }); - it("can register a new user - expose the right tokens for the react apps - and force logout.", () => { + it('can register a new user - expose the right tokens for the react apps - and force logout.', () => { cy.setupAdgangsplatformenRegisterMappinngs({ - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc", - accessToken: "447131b0a03fe0421204c54e5c21a60-new-user", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc', + accessToken: '447131b0a03fe0421204c54e5c21a60-new-user', userCPR: 1412749999, }); cy.clearCookies(); - cy.visit("/arrangementer"); - cy.getBySel("header-menu-profile-button").click(); - cy.get(".modal-login__btn-create-profile").click(); - cy.get("main#main-content") - .get(".paragraphs__item--user_registration_section__link") + cy.visit('/arrangementer'); + cy.getBySel('header-menu-profile-button').click(); + cy.get('.modal-login__btn-create-profile').click(); + cy.get('main#main-content') + .get('.paragraphs__item--user_registration_section__link') .first() .click(); cy.verifyToken({ - tokenType: "unregistered-user", - token: "447131b0a03fe0421204c54e5c21a60-new-user", + tokenType: 'unregistered-user', + token: '447131b0a03fe0421204c54e5c21a60-new-user', }); - cy.get('[data-cy="phone-input"]').type("12345678"); - cy.get('[data-cy="email-address-input"]').type("john@doe.com"); - cy.get('[data-cy="pincode-input"]').type("1234"); - cy.get('[data-cy="pincode-confirm-input"]').type("1234"); - cy.get("#branches-dropdown").select("DK-775100"); + cy.get('[data-cy="phone-input"]').type('12345678'); + cy.get('[data-cy="email-address-input"]').type('john@doe.com'); + cy.get('[data-cy="pincode-input"]').type('1234'); + cy.get('[data-cy="pincode-confirm-input"]').type('1234'); + cy.get('#branches-dropdown').select('DK-775100'); cy.get('[data-cy="complete-user-registration-button"]').click(); cy.get('[data-cy="button"]').click(); - cy.origin("login.bib.dk", () => { - cy.url().should("to.match", /^https:\/\/login.bib.dk\/logout\?.*/); + cy.origin('login.bib.dk', () => { + cy.url().should('to.match', /^https:\/\/login.bib.dk\/logout\?.*/); cy.url().should( - "to.match", - /.*redirect_uri=.*\/login%3Fcurrent-path%3D\/velkommen.*/ + 'to.match', + /.*redirect_uri=.*\/login%3Fcurrent-path%3D\/velkommen.*/, ); }); }); - it("can cancel user registration from the user registration page", () => { + it('can cancel user registration from the user registration page', () => { cy.setupAdgangsplatformenRegisterMappinngs({ - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc", - accessToken: "447131b0a03fe0421204c54e5c21a60-new-user", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc', + accessToken: '447131b0a03fe0421204c54e5c21a60-new-user', userCPR: 1412749999, }); cy.clearCookies(); - cy.visit("/arrangementer"); - cy.getBySel("header-menu-profile-button").click(); - cy.get(".modal-login__btn-create-profile").click(); - cy.get("main#main-content") - .get(".paragraphs__item--user_registration_section__link") + cy.visit('/arrangementer'); + cy.getBySel('header-menu-profile-button').click(); + cy.get('.modal-login__btn-create-profile').click(); + cy.get('main#main-content') + .get('.paragraphs__item--user_registration_section__link') .first() .click(); cy.verifyToken({ - tokenType: "unregistered-user", - token: "447131b0a03fe0421204c54e5c21a60-new-user", + tokenType: 'unregistered-user', + token: '447131b0a03fe0421204c54e5c21a60-new-user', }); cy.get('[data-cy="cancel-user-registration-button"]').click(); - cy.request("/dpl-react/user-tokens").then((response) => { + cy.request('/dpl-react/user-tokens').then((response) => { expect(response.body).not.contain( - 'window.dplReact = window.dplReact || {};\nwindow.dplReact.setToken("user", "447131b0a03fe0421204c54e5c21a60-new-user")' + 'window.dplReact = window.dplReact || {};\nwindow.dplReact.setToken("user", "447131b0a03fe0421204c54e5c21a60-new-user")', ); expect(response.body).not.contain( - 'window.dplReact = window.dplReact || {};\nwindow.dplReact.setToken("unregistered-user", "447131b0a03fe0421204c54e5c21a60-new-user")' + 'window.dplReact = window.dplReact || {};\nwindow.dplReact.setToken("unregistered-user", "447131b0a03fe0421204c54e5c21a60-new-user")', ); }); }); diff --git a/cypress/e2e/campaign.cy.ts b/cypress/e2e/campaign.cy.ts index 8a69cd120..7fb787214 100644 --- a/cypress/e2e/campaign.cy.ts +++ b/cypress/e2e/campaign.cy.ts @@ -1,40 +1,40 @@ // The campaign types and titles. const campaigns = { - authorCampaign: "Promote authors: H. P. Lovecraft and Stephen King", - booksByJKRowling: "Read books by J. K. Rowling", - rankingAndCampaign: "An AND campaign for testing ranking matching", - rankingOrCampaign: "An OR campaign for testing ranking matching", + authorCampaign: 'Promote authors: H. P. Lovecraft and Stephen King', + booksByJKRowling: 'Read books by J. K. Rowling', + rankingAndCampaign: 'An AND campaign for testing ranking matching', + rankingOrCampaign: 'An OR campaign for testing ranking matching', } as const; -describe("Campaign creation and endpoint", () => { - it("Select the expected campaign based on OR rules", () => { - cy.api("POST", "/dpl_campaign/match", [ +describe('Campaign creation and endpoint', () => { + it('Select the expected campaign based on OR rules', () => { + cy.api('POST', '/dpl_campaign/match', [ { - name: "type", + name: 'type', values: [ { - key: "Bog", - term: "Bog", + key: 'Bog', + term: 'Bog', score: 1, }, { - key: "E-bog", - term: "E-bog", + key: 'E-bog', + term: 'E-bog', score: 1, }, ], }, { - name: "creators", + name: 'creators', values: [ { - key: "Stephen King", - term: "Stephen King", + key: 'Stephen King', + term: 'Stephen King', score: 1, }, { - key: "Suzanne Bjerrehuus", - term: "Suzanne Bjerrehuus", + key: 'Suzanne Bjerrehuus', + term: 'Suzanne Bjerrehuus', score: 1, }, ], @@ -43,45 +43,45 @@ describe("Campaign creation and endpoint", () => { const campaign = getCampaignFromResponse(response); expect(campaign.title).to.eq( - "Promote authors: H. P. Lovecraft and Stephen King" + 'Promote authors: H. P. Lovecraft and Stephen King', ); expect(campaign.text).to.eq( - "Promote authors: H. P. Lovecraft and Stephen King" + 'Promote authors: H. P. Lovecraft and Stephen King', ); expect(campaign.url).to.eq( - "https://example.com/promote-authors-h-p-lovecraft-and-stephen-king" + 'https://example.com/promote-authors-h-p-lovecraft-and-stephen-king', ); }); }); - it("Select OR campaign when not all AND rules are met", () => { - cy.api("POST", "/dpl_campaign/match", [ + it('Select OR campaign when not all AND rules are met', () => { + cy.api('POST', '/dpl_campaign/match', [ { - name: "creators", + name: 'creators', values: [ { - key: "Stephen King", - term: "Stephen King", + key: 'Stephen King', + term: 'Stephen King', score: 1, }, ], }, { - name: "mainLanguages", + name: 'mainLanguages', values: [ { - key: "Dansk", - term: "Dansk", + key: 'Dansk', + term: 'Dansk', score: 1, }, ], }, { - name: "materialTypes", + name: 'materialTypes', values: [ { - key: "Bog", - term: "Bog", + key: 'Bog', + term: 'Bog', score: 1, }, ], @@ -90,52 +90,52 @@ describe("Campaign creation and endpoint", () => { const campaign = getCampaignFromResponse(response); expect(Object.keys(campaign).length).to.eq(4); - expect(campaign).to.have.property("id"); + expect(campaign).to.have.property('id'); expect(campaign.title).to.eq( - "Promote authors: H. P. Lovecraft and Stephen King" + 'Promote authors: H. P. Lovecraft and Stephen King', ); expect(campaign.text).to.eq( - "Promote authors: H. P. Lovecraft and Stephen King" + 'Promote authors: H. P. Lovecraft and Stephen King', ); expect(campaign.url).to.eq( - "https://example.com/promote-authors-h-p-lovecraft-and-stephen-king" + 'https://example.com/promote-authors-h-p-lovecraft-and-stephen-king', ); }); }); - it("Select AND campaign that are more specific than OR campaigns", () => { - cy.api("POST", "/dpl_campaign/match", [ + it('Select AND campaign that are more specific than OR campaigns', () => { + cy.api('POST', '/dpl_campaign/match', [ { - name: "creators", + name: 'creators', values: [ { - key: "J. K. Rowling", - term: "J. K. Rowling", + key: 'J. K. Rowling', + term: 'J. K. Rowling', score: 1, }, { - key: "Stephen King", - term: "Stephen King", + key: 'Stephen King', + term: 'Stephen King', score: 1, }, ], }, { - name: "mainLanguages", + name: 'mainLanguages', values: [ { - key: "Dansk", - term: "Dansk", + key: 'Dansk', + term: 'Dansk', score: 1, }, ], }, { - name: "materialTypes", + name: 'materialTypes', values: [ { - key: "Bog", - term: "Bog", + key: 'Bog', + term: 'Bog', score: 1, }, ], @@ -144,60 +144,60 @@ describe("Campaign creation and endpoint", () => { const campaign = getCampaignFromResponse(response); expect(Object.keys(campaign).length).to.eq(4); - expect(campaign).to.have.property("id"); - expect(campaign.title).to.eq("Read books by J. K. Rowling"); - expect(campaign.text).to.eq("Read books by J. K. Rowling"); + expect(campaign).to.have.property('id'); + expect(campaign.title).to.eq('Read books by J. K. Rowling'); + expect(campaign.text).to.eq('Read books by J. K. Rowling'); expect(campaign.url).to.eq( - "https://example.com/read-books-by-j-k-rowling" + 'https://example.com/read-books-by-j-k-rowling', ); }); }); it("Select campaigns by matching an 'AND campaign' with matching ranking", () => { - cy.request("POST", "/dpl_campaign/match", [ + cy.request('POST', '/dpl_campaign/match', [ { - name: "creators", + name: 'creators', values: [ { - key: "A", - term: "A", + key: 'A', + term: 'A', score: 4, }, { - key: "B", - term: "B", + key: 'B', + term: 'B', score: 3, }, { - key: "rankingTestAnd", - term: "rankingTestAnd", + key: 'rankingTestAnd', + term: 'rankingTestAnd', // This score is supposed to give a ranking of 3 // which is the max value of the rule and therefore a match: score: 2, }, { - key: "C", - term: "C", + key: 'C', + term: 'C', score: 1, }, ], }, { - name: "mainLanguages", + name: 'mainLanguages', values: [ { - key: "rankingTestAnd", - term: "rankingTestAnd", + key: 'rankingTestAnd', + term: 'rankingTestAnd', score: 5, }, ], }, { - name: "materialTypes", + name: 'materialTypes', values: [ { - key: "rankingTestAnd", - term: "rankingTestAnd", + key: 'rankingTestAnd', + term: 'rankingTestAnd', score: 5, }, ], @@ -206,96 +206,96 @@ describe("Campaign creation and endpoint", () => { const campaign = getCampaignFromResponse(response); expect(Object.keys(campaign).length).to.eq(4); - expect(campaign).to.have.property("id"); + expect(campaign).to.have.property('id'); expect(campaign.title).to.eq( - "An AND campaign for testing ranking matching" + 'An AND campaign for testing ranking matching', ); expect(campaign.text).to.eq( - "An AND campaign for testing ranking matching" + 'An AND campaign for testing ranking matching', ); expect(campaign.url).to.eq( - "https://example.com/an-and-campaign-for-testing-ranking-matching" + 'https://example.com/an-and-campaign-for-testing-ranking-matching', ); }); }); it("Return NOT FOUND when ranking does not match ranking span in 'AND campaign'", () => { cy.api({ - url: "/dpl_campaign/match", - method: "POST", + url: '/dpl_campaign/match', + method: 'POST', failOnStatusCode: false, body: [ { - name: "creators", + name: 'creators', values: [ { - key: "A", - term: "A", + key: 'A', + term: 'A', score: 6, }, { - key: "B", - term: "B", + key: 'B', + term: 'B', score: 5, }, { - key: "C", - term: "C", + key: 'C', + term: 'C', score: 4, }, { - key: "D", - term: "D", + key: 'D', + term: 'D', score: 3, }, { - key: "E", - term: "E", + key: 'E', + term: 'E', score: 2, }, { - key: "rankingTestAnd", - term: "rankingTestAnd", + key: 'rankingTestAnd', + term: 'rankingTestAnd', // This is supposed to be outside of the ranking span. score: 1, }, ], }, { - name: "mainLanguages", + name: 'mainLanguages', values: [ { - key: "rankingTestAnd", - term: "rankingTestAnd", + key: 'rankingTestAnd', + term: 'rankingTestAnd', score: 5, }, ], }, { - name: "materialTypes", + name: 'materialTypes', values: [ { - key: "rankingTestAnd", - term: "rankingTestAnd", + key: 'rankingTestAnd', + term: 'rankingTestAnd', score: 5, }, ], }, ], }) - .its("status") - .should("equal", 404); + .its('status') + .should('equal', 404); }); - it("returns data for editorial users", () => { + it('returns data for editorial users', () => { cy.drupalLogin(); - cy.api("POST", "/dpl_campaign/match", [ + cy.api('POST', '/dpl_campaign/match', [ { - name: "materialTypes", + name: 'materialTypes', values: [ { - key: "Bog", - term: "Bog", + key: 'Bog', + term: 'Bog', score: 1, }, ], @@ -306,20 +306,20 @@ describe("Campaign creation and endpoint", () => { cy.anonymousUser(); }); - it("returns data for patron users", () => { + it('returns data for patron users', () => { cy.adgangsplatformenLogin({ - authorizationCode: "auth-code", + authorizationCode: 'auth-code', userCPR: 1234567890, - userGuid: "abcd-1234-efgh", - accessToken: "some-token", + userGuid: 'abcd-1234-efgh', + accessToken: 'some-token', }); - cy.api("POST", "/dpl_campaign/match", [ + cy.api('POST', '/dpl_campaign/match', [ { - name: "materialTypes", + name: 'materialTypes', values: [ { - key: "Bog", - term: "Bog", + key: 'Bog', + term: 'Bog', score: 1, }, ], @@ -364,22 +364,22 @@ describe("Campaign creation and endpoint", () => { const createAuthorCampaign = () => { createCampaign(() => { - createCampaignMainProperties(campaigns.authorCampaign, "OR"); + createCampaignMainProperties(campaigns.authorCampaign, 'OR'); createCampaignRule(0, { - facet: "creators", - term: "H. P. Lovecraft", + facet: 'creators', + term: 'H. P. Lovecraft', maxValue: 1, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(1, { - facet: "creators", - term: "Stephen King", + facet: 'creators', + term: 'Stephen King', maxValue: 2, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(2, { - facet: "materialTypes", - term: "Bog", + facet: 'materialTypes', + term: 'Bog', maxValue: 3, }); }); @@ -387,22 +387,22 @@ const createAuthorCampaign = () => { const createCampaignBooksByJKRowling = () => { createCampaign(() => { - createCampaignMainProperties(campaigns.booksByJKRowling, "AND"); + createCampaignMainProperties(campaigns.booksByJKRowling, 'AND'); createCampaignRule(0, { - facet: "creators", - term: "J. K. Rowling", + facet: 'creators', + term: 'J. K. Rowling', maxValue: 1, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(1, { - facet: "mainLanguages", - term: "Dansk", + facet: 'mainLanguages', + term: 'Dansk', maxValue: 2, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(2, { - facet: "materialTypes", - term: "Bog", + facet: 'materialTypes', + term: 'Bog', maxValue: 3, }); }); @@ -410,22 +410,22 @@ const createCampaignBooksByJKRowling = () => { const createRankingAndCampaign = () => { createCampaign(() => { - createCampaignMainProperties(campaigns.rankingAndCampaign, "AND"); + createCampaignMainProperties(campaigns.rankingAndCampaign, 'AND'); createCampaignRule(0, { - facet: "creators", - term: "rankingTestAnd", + facet: 'creators', + term: 'rankingTestAnd', maxValue: 3, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(1, { - facet: "mainLanguages", - term: "rankingTestAnd", + facet: 'mainLanguages', + term: 'rankingTestAnd', maxValue: 3, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(2, { - facet: "materialTypes", - term: "rankingTestAnd", + facet: 'materialTypes', + term: 'rankingTestAnd', maxValue: 3, }); }); @@ -433,77 +433,77 @@ const createRankingAndCampaign = () => { const createRankingOrCampaign = () => { createCampaign(() => { - createCampaignMainProperties(campaigns.rankingOrCampaign, "OR"); + createCampaignMainProperties(campaigns.rankingOrCampaign, 'OR'); createCampaignRule(0, { - facet: "creators", - term: "rankingTestOr", + facet: 'creators', + term: 'rankingTestOr', maxValue: 5, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(1, { - facet: "mainLanguages", - term: "rankingTestOr", + facet: 'mainLanguages', + term: 'rankingTestOr', maxValue: 5, }); - cy.get("[id^=field-campaign-rules-campaign-rule-add-more]").click(); + cy.get('[id^=field-campaign-rules-campaign-rule-add-more]').click(); createCampaignRule(2, { - facet: "materialTypes", - term: "rankingTestOr", + facet: 'materialTypes', + term: 'rankingTestOr', maxValue: 5, }); }); }; const createCampaign = (callback: () => void) => { - cy.visit("/node/add/campaign"); + cy.visit('/node/add/campaign'); callback(); cy.get('input[value="Save"]').click(); }; const deleteCampaign = (title: string) => { - cy.visit("/admin/content"); + cy.visit('/admin/content'); cy.contains(title) - .parents("tr") - .find("td li.dropbutton-toggle button") + .parents('tr') + .find('td li.dropbutton-toggle button') .click() .then(($button) => { cy.wrap($button) - .parent(".dropbutton-toggle") - .parent("ul.dropbutton") - .find("li.delete a") + .parent('.dropbutton-toggle') + .parent('ul.dropbutton') + .find('li.delete a') .click(); - cy.get(".ui-dialog .form-submit") - .filter(":visible") - .should("exist") + cy.get('.ui-dialog .form-submit') + .filter(':visible') + .should('exist') .click(); }); }; -const createCampaignMainProperties = (name: string, logic: "AND" | "OR") => { +const createCampaignMainProperties = (name: string, logic: 'AND' | 'OR') => { const campaignUri = name - .replace(/ /g, "-") - .replace(/[.:]/g, "") + .replace(/ /g, '-') + .replace(/[.:]/g, '') .toLowerCase(); - cy.get("#edit-title-0-value").type(name); - cy.get("#edit-field-campaign-link-0-uri").type( - `https://example.com/${campaignUri}` + cy.get('#edit-title-0-value').type(name); + cy.get('#edit-field-campaign-link-0-uri').type( + `https://example.com/${campaignUri}`, ); - cy.get("#edit-field-campaign-text-0-value").type(name); - cy.get("#edit-field-campaign-rules-logic").select(logic); + cy.get('#edit-field-campaign-text-0-value').type(name); + cy.get('#edit-field-campaign-rules-logic').select(logic); }; const createCampaignRule = ( index: number, - { facet, term, maxValue }: { facet: string; term: string; maxValue: number } + { facet, term, maxValue }: { facet: string; term: string; maxValue: number }, ) => { cy.get(`select[id*="-${index}-subform-field-campaign-rule-facet"]`).select( - facet + facet, ); cy.get( - `input[id*="-${index}-subform-field-campaign-rule-term-0-value"]` + `input[id*="-${index}-subform-field-campaign-rule-term-0-value"]`, ).type(term); cy.get( - `input[id*="-${index}-subform-field-campaign-rule-ranking-max-0-value"]` + `input[id*="-${index}-subform-field-campaign-rule-ranking-max-0-value"]`, ).type(maxValue.toString()); }; diff --git a/cypress/e2e/check-static-pages.cy.ts b/cypress/e2e/check-static-pages.cy.ts index 266328a7a..a37dc831f 100644 --- a/cypress/e2e/check-static-pages.cy.ts +++ b/cypress/e2e/check-static-pages.cy.ts @@ -1,26 +1,26 @@ -describe("Check static pages", () => { +describe('Check static pages', () => { it("does 'Privatlivspolitik' page exist", () => { - cy.visit("/privatlivspolitik"); - cy.get("main#main-content").get(".article-header").should("exist"); + cy.visit('/privatlivspolitik'); + cy.get('main#main-content').get('.article-header').should('exist'); }); it("does 'Velkommen' page exist", () => { - cy.visit("/velkommen"); - cy.get("main#main-content").get(".article-header").should("exist"); + cy.visit('/velkommen'); + cy.get('main#main-content').get('.article-header').should('exist'); }); it("does 'Pausefunktion' page exist", () => { - cy.visit("/pausefunktion"); - cy.get("main#main-content").get(".article-header").should("exist"); + cy.visit('/pausefunktion'); + cy.get('main#main-content').get('.article-header').should('exist'); }); it("does 'Takster' page exist", () => { - cy.visit("/takster"); - cy.get("main#main-content").get(".article-header").should("exist"); + cy.visit('/takster'); + cy.get('main#main-content').get('.article-header').should('exist'); }); it("does 'Reglement' page exist", () => { - cy.visit("/reglement"); - cy.get("main#main-content").get(".article-header").should("exist"); + cy.visit('/reglement'); + cy.get('main#main-content').get('.article-header').should('exist'); }); it("does 'Opret bruger' page exist", () => { - cy.visit("/opret-bruger"); - cy.get("main#main-content").get(".article-header").should("exist"); + cy.visit('/opret-bruger'); + cy.get('main#main-content').get('.article-header').should('exist'); }); }); diff --git a/cypress/e2e/dpl-react-apps.cy.ts b/cypress/e2e/dpl-react-apps.cy.ts index 501ee58e6..2c906afb5 100644 --- a/cypress/e2e/dpl-react-apps.cy.ts +++ b/cypress/e2e/dpl-react-apps.cy.ts @@ -1,18 +1,18 @@ -describe("DPL React Apps", () => { - it("exposes tokens", () => { +describe('DPL React Apps', () => { + it('exposes tokens', () => { // These dummy values resemble what is used in production scenarios. - const libraryAccessToken = "447131b0a03fe0421204c54e5c21a60d70030fd2"; - const authorizationCode = "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc"; - const accessToken = "447131b0a03fe0421204c54e5c21a60d70030fd1"; - const userGuid = "19a4ae39-be07-4db9-a8b7-8bbb29f03da6"; + const libraryAccessToken = '447131b0a03fe0421204c54e5c21a60d70030fd2'; + const authorizationCode = '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc'; + const accessToken = '447131b0a03fe0421204c54e5c21a60d70030fd1'; + const userGuid = '19a4ae39-be07-4db9-a8b7-8bbb29f03da6'; const userCPR = 9999999999; // Running cron will issue a request to retrieve a library token using OAuth // password type grants. cy.createMapping({ request: { - method: "POST", - urlPath: "/oauth/token/", + method: 'POST', + urlPath: '/oauth/token/', headers: { Authorization: { contains: `Basic`, @@ -20,13 +20,13 @@ describe("DPL React Apps", () => { }, bodyPatterns: [ { - contains: "grant_type=password", + contains: 'grant_type=password', }, { - contains: "username=", + contains: 'username=', }, { - contains: "password=", + contains: 'password=', }, ], }, @@ -47,8 +47,8 @@ describe("DPL React Apps", () => { userGuid, }); - cy.verifyToken({ tokenType: "library", token: libraryAccessToken }); - cy.verifyToken({ tokenType: "user", token: accessToken }); + cy.verifyToken({ tokenType: 'library', token: libraryAccessToken }); + cy.verifyToken({ tokenType: 'user', token: accessToken }); }); beforeEach(() => { diff --git a/cypress/e2e/events.cy.ts b/cypress/e2e/events.cy.ts index c8fa26d15..26e6f9d30 100644 --- a/cypress/e2e/events.cy.ts +++ b/cypress/e2e/events.cy.ts @@ -1,97 +1,97 @@ -import * as dayjs from "dayjs"; -import "cypress-if"; +import * as dayjs from 'dayjs'; +import 'cypress-if'; const events = { singleEvent: { - title: "Single event", - subtitle: "A subtitle", - recurType: "Custom/Single Event", - start: dayjs("2030-01-01T10:00:00"), - end: dayjs("2030-01-01T16:00:00"), + title: 'Single event', + subtitle: 'A subtitle', + recurType: 'Custom/Single Event', + start: dayjs('2030-01-01T10:00:00'), + end: dayjs('2030-01-01T16:00:00'), }, }; -const setDate = (field: "Start date" | "End date", date: dayjs.Dayjs) => { +const setDate = (field: 'Start date' | 'End date', date: dayjs.Dayjs) => { cy.findByText(field) .siblings() - .findByLabelText("Date") - .type(date.format("YYYY-MM-DD")); + .findByLabelText('Date') + .type(date.format('YYYY-MM-DD')); cy.findByText(field) .siblings() - .findByLabelText("Time") - .type(date.format("HH:mm")); + .findByLabelText('Time') + .type(date.format('HH:mm')); }; -describe("Events", () => { - it("can be created with a single occurrence", () => { +describe('Events', () => { + it('can be created with a single occurrence', () => { // Login as admin. - cy.drupalLogin("/events/add/default"); - cy.findByLabelText("Title").type(events.singleEvent.title); - cy.findByLabelText("Subtitle").type(events.singleEvent.subtitle); - cy.findByLabelText("Recur Type").select(events.singleEvent.recurType, { + cy.drupalLogin('/events/add/default'); + cy.findByLabelText('Title').type(events.singleEvent.title); + cy.findByLabelText('Subtitle').type(events.singleEvent.subtitle); + cy.findByLabelText('Recur Type').select(events.singleEvent.recurType, { // We have to use force when using Select2. force: true, }); - setDate("Start date", events.singleEvent.start); - setDate("End date", events.singleEvent.end); - cy.findByRole("button", { name: "Save" }).click(); + setDate('Start date', events.singleEvent.start); + setDate('End date', events.singleEvent.end); + cy.findByRole('button', { name: 'Save' }).click(); // Ensure that the core data from the event is displayed on the resulting page. // @todo This should probably be replaced by a visual regression test. cy.contains(events.singleEvent.title); - cy.contains(events.singleEvent.start.format("DD MMMM YYYY")); + cy.contains(events.singleEvent.start.format('DD MMMM YYYY')); cy.contains( `${events.singleEvent.start.format( - "HH:mm" - )} - ${events.singleEvent.end.format("HH:mm")}` + 'HH:mm', + )} - ${events.singleEvent.end.format('HH:mm')}`, ); }); - it("prefills end date/time based on start date/time", () => { + it('prefills end date/time based on start date/time', () => { // Login as admin. - cy.drupalLogin("/events/add/default"); - setDate("Start date", events.singleEvent.start); - cy.findByText("End date") + cy.drupalLogin('/events/add/default'); + setDate('Start date', events.singleEvent.start); + cy.findByText('End date') .siblings() - .findByLabelText("Date") + .findByLabelText('Date') .focus() - .should("have.value", events.singleEvent.start.format("YYYY-MM-DD")); - cy.findByText("End date") + .should('have.value', events.singleEvent.start.format('YYYY-MM-DD')); + cy.findByText('End date') .siblings() - .findByLabelText("Time") + .findByLabelText('Time') .focus() .should( - "have.value", - events.singleEvent.start.add(1, "hour").format("HH:mm") + 'have.value', + events.singleEvent.start.add(1, 'hour').format('HH:mm'), ); }); before(() => { - cy.drupalLogin("/admin/content/eventseries"); + cy.drupalLogin('/admin/content/eventseries'); // Delete all preexisting instances of each event. - cy.get("a") + cy.get('a') .contains(events.singleEvent.title) .if() .each(() => { // We have to repeat the selector as Cypress will otherwise complain about // missing references to elements when clicking the page. - cy.findAllByRole("link", { name: events.singleEvent.title }) + cy.findAllByRole('link', { name: events.singleEvent.title }) .first() .click(); - cy.findByRole("link", { + cy.findByRole('link', { name: `Edit ${events.singleEvent.title}`, }).click(); - cy.findByRole("button", { name: "More actions" }) + cy.findByRole('button', { name: 'More actions' }) .click() .parent() - .findByRole("link", { name: "Delete" }) + .findByRole('link', { name: 'Delete' }) .click(); - cy.findByRole("dialog") - .findByRole("button", { name: "Delete" }) + cy.findByRole('dialog') + .findByRole('button', { name: 'Delete' }) .click(); // Return to the event list to prepare for the next iteration. - cy.visit("/admin/content/eventseries"); + cy.visit('/admin/content/eventseries'); }); }); }); diff --git a/cypress/e2e/mapp-tracking.cy.ts b/cypress/e2e/mapp-tracking.cy.ts index 91f754358..2aee40b38 100644 --- a/cypress/e2e/mapp-tracking.cy.ts +++ b/cypress/e2e/mapp-tracking.cy.ts @@ -1,12 +1,12 @@ -describe("Mapp Tracking", () => { - it("tracks page views", () => { - const customerId = "1234"; +describe('Mapp Tracking', () => { + it('tracks page views', () => { + const customerId = '1234'; // Mapp will not perform requests if wt_r cookie is set so clear it before // our test and also use cookie debugging to help understand the process. cy.clearCookies(); cy.drupalLogin(); - cy.visit("/admin/config/system/dpl-mapp") + cy.visit('/admin/config/system/dpl-mapp') .get('[name="id"]') .clear() .type(customerId) @@ -14,10 +14,10 @@ describe("Mapp Tracking", () => { .get('[value="Save configuration"]') .first() .click(); - cy.visit("/"); + cy.visit('/'); cy.getRequestCount({ urlPathPattern: `^/resp/api/get/${customerId}.*`, - }).should("be.greaterThan", 0); + }).should('be.greaterThan', 0); }); beforeEach(() => { diff --git a/cypress/e2e/opening-hours-editor.cy.ts b/cypress/e2e/opening-hours-editor.cy.ts index 1b7853ab3..425b8c199 100644 --- a/cypress/e2e/opening-hours-editor.cy.ts +++ b/cypress/e2e/opening-hours-editor.cy.ts @@ -1,12 +1,12 @@ -const branchTitle = "Test branch"; -const firstDateOfJanuary2024 = "2024-01-01"; +const branchTitle = 'Test branch'; +const firstDateOfJanuary2024 = '2024-01-01'; enum OpeningHourCategories { - Opening = "Åbent", - CitizenService = "Borgerservice", - WithService = "Med betjening", - SelfService = "Selvbetjening", - PhoneTime = "Telefontid", + Opening = 'Åbent', + CitizenService = 'Borgerservice', + WithService = 'Med betjening', + SelfService = 'Selvbetjening', + PhoneTime = 'Telefontid', } type TimeString = `${number}:${number}`; @@ -27,15 +27,15 @@ type OpeningHourFormType = { endDate?: string; }; -type PartialOpeningHourFormType = Omit & { +type PartialOpeningHourFormType = Omit & { timeDuration?: PartialTimeDurationType; }; -const reverseDateString = (date: string) => date.split("-").reverse().join("-"); +const reverseDateString = (date: string) => date.split('-').reverse().join('-'); const createTestBranchAndVisitOpeningHoursAdmin = () => { - cy.drupalLogin("/node/add/branch"); - cy.get("#edit-title-0-value").type(branchTitle); + cy.drupalLogin('/node/add/branch'); + cy.get('#edit-title-0-value').type(branchTitle); cy.get('button[title="Show all Paragraphs"]').click(); // Forcing and multiple was the only way I could get this to work cy.get('button[value="Opening Hours"]').click({ @@ -43,49 +43,49 @@ const createTestBranchAndVisitOpeningHoursAdmin = () => { force: true, }); // Forcing is necessary because the fields are hidden by and shown in a "popup" - cy.get("#edit-field-address-0-address-address-line1") - .type("Example Street", { force: true }) - .should("have.value", "Example Street"); - cy.get("#edit-field-address-0-address-postal-code") - .type("1234", { force: true }) - .should("have.value", "1234"); - cy.get("#edit-field-address-0-address-locality") - .type("Example City", { force: true }) - .should("have.value", "Example City"); + cy.get('#edit-field-address-0-address-address-line1') + .type('Example Street', { force: true }) + .should('have.value', 'Example Street'); + cy.get('#edit-field-address-0-address-postal-code') + .type('1234', { force: true }) + .should('have.value', '1234'); + cy.get('#edit-field-address-0-address-locality') + .type('Example City', { force: true }) + .should('have.value', 'Example City'); cy.get('input[value="Save"]').click(); cy.get('a[href^="/node/"][href$="/edit"]').click({ force: true }); cy.get('a[href*="/edit/opening-hours"]').click(); // Save the URL for the admin page and the page itself for later use cy.url().then((url) => { - Cypress.env("adminUrl", url); - const pageUrl = url.replace("/edit/opening-hours", ""); - Cypress.env("pageUrl", pageUrl); + Cypress.env('adminUrl', url); + const pageUrl = url.replace('/edit/opening-hours', ''); + Cypress.env('pageUrl', pageUrl); }); }; const deleteAllTestBranchesIfExists = () => { - const formattedSearchString = branchTitle.toLowerCase().replace(/ /g, "+"); + const formattedSearchString = branchTitle.toLowerCase().replace(/ /g, '+'); cy.drupalLogin(); cy.visit( - `/admin/content?title=${formattedSearchString}&type=branch&status=All&langcode=All` + `/admin/content?title=${formattedSearchString}&type=branch&status=All&langcode=All`, ); - cy.get("tbody").then((tbody) => { - if (tbody.find("td.views-empty").length) { - cy.log("No branches to delete."); + cy.get('tbody').then((tbody) => { + if (tbody.find('td.views-empty').length) { + cy.log('No branches to delete.'); } else { cy.get('input[title="Select all rows in this table"]').check({ force: true, }); - cy.get("#edit-action").select("node_delete_action"); - cy.contains("input", "Apply to selected items").click(); - cy.contains("input", "Delete").click(); + cy.get('#edit-action').select('node_delete_action'); + cy.contains('input', 'Apply to selected items').click(); + cy.contains('input', 'Delete').click(); } }); }; const visitOpeningHoursPage = (initialDate?: string) => { - const pageUrl = Cypress.env("pageUrl"); + const pageUrl = Cypress.env('pageUrl'); if (pageUrl) { const url = initialDate ? `${pageUrl}?initialDate=${initialDate}` : pageUrl; cy.visit(url); @@ -93,7 +93,7 @@ const visitOpeningHoursPage = (initialDate?: string) => { }; const visitOpeningHoursAdmin = (initialDate?: string) => { - const adminUrl = Cypress.env("adminUrl"); + const adminUrl = Cypress.env('adminUrl'); if (adminUrl) { const url = initialDate ? `${adminUrl}?initialDate=${initialDate}` @@ -107,14 +107,14 @@ const navigateToNextWeekOrMonthAdmin = () => { }; const navigateToMonthViewAdmin = () => { - cy.get(".fc-dayGridMonth-button").click(); + cy.get('.fc-dayGridMonth-button').click(); }; const selectTodayFromMonthViewAdmin = () => { - cy.get(".fc-day-today").click(); + cy.get('.fc-day-today').click(); }; -const firstDateOfFebruary2024 = "2024-02-01"; +const firstDateOfFebruary2024 = '2024-02-01'; const clickFirstDayInMonthViewAdmin = () => { cy.get('[data-date$="-01"]').first().click(); @@ -132,25 +132,25 @@ const fillOpeningHourForm = ({ timeDuration: { start, end }, endDate, }: Partial) => { - cy.getBySel("opening-hours-editor-form").should("be.visible"); + cy.getBySel('opening-hours-editor-form').should('be.visible'); if (openingHourCategory) { - cy.getBySel("opening-hours-editor-form-select").select(openingHourCategory); + cy.getBySel('opening-hours-editor-form-select').select(openingHourCategory); } if (start) { - cy.getBySel("opening-hours-editor-form-start-time").focus().type(start); + cy.getBySel('opening-hours-editor-form-start-time').focus().type(start); } if (end) { - cy.getBySel("opening-hours-editor-form-end-time").focus().type(end); + cy.getBySel('opening-hours-editor-form-end-time').focus().type(end); } if (endDate) { - cy.getBySel("opening-hours-editor-form-repeated").check(); - cy.getBySel("opening-hours-editor-form-end-date").focus().type(endDate); + cy.getBySel('opening-hours-editor-form-repeated').check(); + cy.getBySel('opening-hours-editor-form-end-date').focus().type(endDate); } }; const submitOpeningHourForm = () => { - cy.getBySel("opening-hours-editor-form-submit").click(); + cy.getBySel('opening-hours-editor-form-submit').click(); }; const checkConfirmationDialog = ({ @@ -158,26 +158,27 @@ const checkConfirmationDialog = ({ timeDuration: { start, end }, endDate, }: Required) => { - cy.getBySel("opening-hours-editor-confirm-add-repeated-form") - .should("be.visible") - .and("contain", openingHourCategory) - .and("contain", start) - .and("contain", end) - .and("contain", reverseDateString(endDate)); + cy.getBySel('opening-hours-editor-confirm-add-repeated-form') + .should('be.visible') + .and('contain', openingHourCategory) + .and('contain', start) + .and('contain', end) + .and('contain', reverseDateString(endDate)); }; const confirmAddRepeatedOpeningHourForm = () => { - cy.getBySel("opening-hours-editor-form__confirm").click(); + cy.getBySel('opening-hours-editor-form__confirm').click(); }; const validateOpeningHoursPage = ({ openingHourCategory, timeDuration: { start, end }, }: OpeningHourFormType) => { - cy.getBySel("opening-hours-week-list") - .should("be.visible") - .and("contain", openingHourCategory) - .and("contain", `${start} - ${end}`); + cy.getBySel('opening-hours-week-list') + .scrollIntoView() + .should('be.visible') + .and('contain', openingHourCategory) + .and('contain', `${start} - ${end}`); }; const validateNumberOfOpeningHoursExistAdmin = ({ @@ -187,7 +188,7 @@ const validateNumberOfOpeningHoursExistAdmin = ({ }: OpeningHourFormType & { expectedOpeningHours: number }) => { return cy .get('tbody[role="presentation"]') - .should("be.visible") + .should('be.visible') .find('div[data-cy="opening-hours-editor-event-content"]') .filter((index, element) => { const openingHour = Cypress.$(element).text(); @@ -196,7 +197,7 @@ const validateNumberOfOpeningHoursExistAdmin = ({ openingHour.includes(`${start} - ${end}`) ); }) - .should("have.length", expectedOpeningHours); + .should('have.length', expectedOpeningHours); }; const validateOpeningHoursRemovedAdmin = ({ @@ -206,13 +207,13 @@ const validateOpeningHoursRemovedAdmin = ({ }) => { return cy .get('tbody[role="presentation"]') - .should("be.visible") + .should('be.visible') .find('div[data-cy="opening-hours-editor-event-content"]') - .should("have.length", editSeriesFromIndex) + .should('have.length', editSeriesFromIndex) .each((element) => { cy.wrap(element) - .should("contain", openingHourCategory) - .and("contain", `${start} - ${end}`); + .should('contain', openingHourCategory) + .and('contain', `${start} - ${end}`); }); }; @@ -220,11 +221,11 @@ const validateOpeningHoursNotPresentPage = ({ openingHourCategory, timeDuration: { start, end }, }: OpeningHourFormType) => { - cy.getBySel("opening-hours-week-list") - .should("be.visible") - .should("not.contain", openingHourCategory) - .should("not.contain", `${start} - ${end}`) - .contains("The library is closed this day"); + cy.getBySel('opening-hours-week-list') + .should('be.visible') + .should('not.contain', openingHourCategory) + .should('not.contain', `${start} - ${end}`) + .contains('The library is closed this day'); }; const validateOpeningHoursNotPresentAdmin = ({ @@ -232,16 +233,16 @@ const validateOpeningHoursNotPresentAdmin = ({ timeDuration: { start, end }, }: OpeningHourFormType) => { cy.get('tbody[role="presentation"]') - .should("be.visible") - .should("not.contain", openingHourCategory) - .should("not.contain", `${start} - ${end}`); + .should('be.visible') + .should('not.contain', openingHourCategory) + .should('not.contain', `${start} - ${end}`); }; -const confirmEditRepeatedOpeningHourForm = (value?: "all") => { +const confirmEditRepeatedOpeningHourForm = (value?: 'all') => { const selector = - value === "all" - ? "opening-hours-editor-form__radio-all" - : "opening-hours-editor-form__radio-this"; + value === 'all' + ? 'opening-hours-editor-form__radio-all' + : 'opening-hours-editor-form__radio-this'; cy.getBySel(selector).click(); confirmAddRepeatedOpeningHourForm(); @@ -276,10 +277,10 @@ const createOpeningHourInNextWeek = ({ navigateToNextWeekOrMonthAdmin(); selectTimeOnThursdayFromWeekView(start); fillOpeningHourForm({ openingHourCategory, timeDuration: { end } }); - cy.getBySel("opening-hours-editor-form-start-time").should( - "have.attr", - "value", - start + cy.getBySel('opening-hours-editor-form-start-time').should( + 'have.attr', + 'value', + start, ); submitOpeningHourForm(); visitOpeningHoursPage(); @@ -287,7 +288,7 @@ const createOpeningHourInNextWeek = ({ openingHourCategory, timeDuration: { start, end }, }); - cy.getBySel("opening-hours-next-week-button").click(); + cy.getBySel('opening-hours-next-week-button').click(); validateOpeningHoursPage({ openingHourCategory, timeDuration: { start, end }, @@ -333,7 +334,7 @@ const createOpeningHoursSeries = ({ openingHourCategory, timeDuration: { start, end }, }); - cy.getBySel("opening-hours-next-week-button").click(); + cy.getBySel('opening-hours-next-week-button').click(); } }; @@ -344,7 +345,7 @@ const updateOpeningHour = ({ // Assume that the event is already created and is visible visitOpeningHoursAdmin(); navigateToMonthViewAdmin(); - cy.getBySel("opening-hours-editor-event-content") + cy.getBySel('opening-hours-editor-event-content') .contains(openingHourCategory) .click(); fillOpeningHourForm({ timeDuration: { start, end } }); @@ -369,13 +370,13 @@ const updateOpeningHoursSeries = ({ // Assume that the event is already created and is visible visitOpeningHoursAdmin(firstDateOfJanuary2024); navigateToMonthViewAdmin(); - cy.getBySel("opening-hours-editor-event-content") + cy.getBySel('opening-hours-editor-event-content') .eq(editSeriesFromIndex) .contains(openingHourCategory) .click(); fillOpeningHourForm({ timeDuration: { start, end } }); submitOpeningHourForm(); - confirmEditRepeatedOpeningHourForm("all"); + confirmEditRepeatedOpeningHourForm('all'); visitOpeningHoursAdmin(firstDateOfJanuary2024); navigateToMonthViewAdmin(); }; @@ -391,7 +392,7 @@ const deleteOpeningHour = ({ openingHourCategory, timeDuration: { start, end }, }).click(); - cy.getBySel("opening-hours-editor-form__remove").click(); + cy.getBySel('opening-hours-editor-form__remove').click(); validateOpeningHoursNotPresentAdmin({ openingHourCategory, timeDuration: { start, end }, @@ -416,8 +417,8 @@ const deleteOpeningHoursSeries = ({ }) .first() .click(); - cy.getBySel("opening-hours-editor-form__remove").click(); - confirmEditRepeatedOpeningHourForm("all"); + cy.getBySel('opening-hours-editor-form__remove').click(); + confirmEditRepeatedOpeningHourForm('all'); visitOpeningHoursAdmin(firstDateOfJanuary2024); navigateToMonthViewAdmin(); validateOpeningHoursNotPresentAdmin({ @@ -432,7 +433,7 @@ const deleteOpeningHoursSeries = ({ openingHourCategory, timeDuration: { start, end }, }); - cy.getBySel("opening-hours-next-week-button").click(); + cy.getBySel('opening-hours-next-week-button').click(); } }; @@ -450,95 +451,95 @@ const deleteRestOfOpeningHoursSeries = ({ }) .eq(editSeriesFromIndex) .click(); - cy.getBySel("opening-hours-editor-form__remove").click(); - confirmEditRepeatedOpeningHourForm("all"); + cy.getBySel('opening-hours-editor-form__remove').click(); + confirmEditRepeatedOpeningHourForm('all'); }; -describe("Opening hours editor", () => { +describe('Opening hours editor', () => { beforeEach(() => { deleteAllTestBranchesIfExists(); createTestBranchAndVisitOpeningHoursAdmin(); }); - it("Checks opening hours categories", () => { + it('Checks opening hours categories', () => { visitOpeningHoursAdmin(); navigateToMonthViewAdmin(); selectTodayFromMonthViewAdmin(); - cy.getBySel("opening-hours-editor-form-select") - .find("option") - .should("have.length", 5) - .and("contain", OpeningHourCategories.Opening) - .and("contain", OpeningHourCategories.CitizenService) - .and("contain", OpeningHourCategories.WithService) - .and("contain", OpeningHourCategories.SelfService) - .and("contain", OpeningHourCategories.PhoneTime); + cy.getBySel('opening-hours-editor-form-select') + .find('option') + .should('have.length', 5) + .and('contain', OpeningHourCategories.Opening) + .and('contain', OpeningHourCategories.CitizenService) + .and('contain', OpeningHourCategories.WithService) + .and('contain', OpeningHourCategories.SelfService) + .and('contain', OpeningHourCategories.PhoneTime); }); - it("Can create an opening hour", () => { + it('Can create an opening hour', () => { createOpeningHour({ openingHourCategory: OpeningHourCategories.Opening, - timeDuration: { start: "08:00", end: "16:00" }, + timeDuration: { start: '08:00', end: '16:00' }, }); }); - it("Can update an opening hour", () => { + it('Can update an opening hour', () => { createOpeningHour({ openingHourCategory: OpeningHourCategories.PhoneTime, - timeDuration: { start: "10:00", end: "11:00" }, + timeDuration: { start: '10:00', end: '11:00' }, }); updateOpeningHour({ openingHourCategory: OpeningHourCategories.PhoneTime, - timeDuration: { start: "10:00", end: "15:00" }, + timeDuration: { start: '10:00', end: '15:00' }, }); }); - it("Can delete an opening hour", () => { + it('Can delete an opening hour', () => { const openingHour: OpeningHourFormType = { openingHourCategory: OpeningHourCategories.WithService, - timeDuration: { start: "10:00", end: "11:00" }, + timeDuration: { start: '10:00', end: '11:00' }, }; createOpeningHour(openingHour); deleteOpeningHour(openingHour); }); - it("Can create opening hour in next week", () => { + it('Can create opening hour in next week', () => { createOpeningHourInNextWeek({ openingHourCategory: OpeningHourCategories.CitizenService, - timeDuration: { start: "10:00", end: "11:00" }, + timeDuration: { start: '10:00', end: '11:00' }, }); }); - it("Can create opening hours series", () => { + it('Can create opening hours series', () => { createOpeningHoursSeries({ openingHourCategory: OpeningHourCategories.SelfService, - timeDuration: { start: "10:00", end: "16:00" }, + timeDuration: { start: '10:00', end: '16:00' }, endDate: firstDateOfFebruary2024, }); }); - it("Can edit all opening hours series", () => { + it('Can edit all opening hours series', () => { createOpeningHoursSeries({ openingHourCategory: OpeningHourCategories.SelfService, - timeDuration: { start: "10:00", end: "16:00" }, + timeDuration: { start: '10:00', end: '16:00' }, endDate: firstDateOfFebruary2024, }); updateOpeningHoursSeries({ openingHourCategory: OpeningHourCategories.SelfService, - timeDuration: { start: "09:00", end: "15:00" }, + timeDuration: { start: '09:00', end: '15:00' }, }); validateNumberOfOpeningHoursExistAdmin({ expectedOpeningHours: 5, openingHourCategory: OpeningHourCategories.SelfService, - timeDuration: { start: "09:00", end: "15:00" }, + timeDuration: { start: '09:00', end: '15:00' }, }); visitOpeningHoursPage(firstDateOfJanuary2024); // Because we use firstDateOfFebruary2024 as endDate we can check the four next weeks for (let i = 0; i < 5; i++) { validateOpeningHoursPage({ openingHourCategory: OpeningHourCategories.SelfService, - timeDuration: { start: "09:00", end: "15:00" }, + timeDuration: { start: '09:00', end: '15:00' }, }); - cy.getBySel("opening-hours-next-week-button").click(); + cy.getBySel('opening-hours-next-week-button').click(); } }); @@ -549,12 +550,12 @@ describe("Opening hours editor", () => { updatedTimeDuration: TimeDurationType; }; - it("Can edit rest of opening hours series", () => { + it('Can edit rest of opening hours series', () => { const editData: EditRestOfOpeningHoursSeriesType = { editSeriesFromIndex: 1, openingHourCategory: OpeningHourCategories.SelfService, - originalTimeDuration: { start: "10:00", end: "16:00" }, - updatedTimeDuration: { start: "09:00", end: "15:00" }, + originalTimeDuration: { start: '10:00', end: '16:00' }, + updatedTimeDuration: { start: '09:00', end: '15:00' }, }; createOpeningHoursSeries({ @@ -585,22 +586,22 @@ describe("Opening hours editor", () => { }); }); - it("Can delete all opening hours series", () => { + it('Can delete all opening hours series', () => { const openingHour: Required = { openingHourCategory: OpeningHourCategories.WithService, - timeDuration: { start: "10:00", end: "11:00" }, + timeDuration: { start: '10:00', end: '11:00' }, endDate: firstDateOfFebruary2024, }; createOpeningHoursSeries(openingHour); deleteOpeningHoursSeries(openingHour); }); - it("Can delete rest of opening hours series", () => { + it('Can delete rest of opening hours series', () => { const editData: Required & { editSeriesFromIndex: number; } = { openingHourCategory: OpeningHourCategories.WithService, - timeDuration: { start: "10:00", end: "11:00" }, + timeDuration: { start: '10:00', end: '11:00' }, endDate: firstDateOfFebruary2024, editSeriesFromIndex: 1, }; diff --git a/cypress/e2e/patron-collisions.cy.ts b/cypress/e2e/patron-collisions.cy.ts index 4156a1dec..03c9c77d9 100644 --- a/cypress/e2e/patron-collisions.cy.ts +++ b/cypress/e2e/patron-collisions.cy.ts @@ -1,46 +1,46 @@ -describe("Adgangsplatformen / CMS user / session mapping", () => { +describe('Adgangsplatformen / CMS user / session mapping', () => { const patron1 = { - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856db", - accessToken: "patron1-token", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856db', + accessToken: 'patron1-token', userCPR: 9999999998, - userGuid: "19a4ae39-be07-4db9-a8b7-8bbb29f03da5", + userGuid: '19a4ae39-be07-4db9-a8b7-8bbb29f03da5', }; const patron2 = { // All values here are shifted by 1 digit. - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc", - accessToken: "patron2-token", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc', + accessToken: 'patron2-token', // This patron has a CPR which partially overlaps with patron1. userCPR: 9999999999, - userGuid: "19a4ae39-be07-4db9-a8b7-8bbb29f03da6", + userGuid: '19a4ae39-be07-4db9-a8b7-8bbb29f03da6', }; const patron3 = { - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dd", - accessToken: "patron3-token", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dd', + accessToken: 'patron3-token', // This patron has a CPR which is entirely different from patron 1. userCPR: 1111111111, - userGuid: "19a4ae39-be07-4db9-a8b7-8bbb29f03da7", + userGuid: '19a4ae39-be07-4db9-a8b7-8bbb29f03da7', }; const patron4 = { - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856de", - accessToken: "patron4-token", - userGuid: "19a4ae39-be07-4db9-a8b7-8bbb29f03da8", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856de', + accessToken: 'patron4-token', + userGuid: '19a4ae39-be07-4db9-a8b7-8bbb29f03da8', }; const patron5 = { - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856df", - accessToken: "patron5-token", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856df', + accessToken: 'patron5-token', // This patron has a GUID which partially overlaps with patron4. - userGuid: "19a4ae39-be07-4db9-a8b7-8bbb29f03da9", + userGuid: '19a4ae39-be07-4db9-a8b7-8bbb29f03da9', }; const patron6 = { - authorizationCode: "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856df", - accessToken: "patron5-token", + authorizationCode: '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856df', + accessToken: 'patron5-token', // This patron has a GUID which is entirely different from patron 4. - userGuid: "12345678-abcd-1234-abcd-123456789012", + userGuid: '12345678-abcd-1234-abcd-123456789012', }; beforeEach(() => { @@ -52,60 +52,60 @@ describe("Adgangsplatformen / CMS user / session mapping", () => { cy.logMappingRequests(); }); - it("handles logins with identical idents", () => { + it('handles logins with identical idents', () => { cy.adgangsplatformenLogin(patron1); - cy.verifyToken({ tokenType: "user", token: patron1.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron1.accessToken }); // Restoring the session should retain the access token. // This is simulated by adgangsplatformenLogin() as this will restore the // session for the patron when invoked with the same parameters. cy.adgangsplatformenLogin(patron1); - cy.verifyToken({ tokenType: "user", token: patron1.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron1.accessToken }); }); - it("handles logins with overlapping CPRs", () => { + it('handles logins with overlapping CPRs', () => { cy.adgangsplatformenLogin(patron1); - cy.verifyToken({ tokenType: "user", token: patron1.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron1.accessToken }); cy.adgangsplatformenLogin(patron2); - cy.verifyToken({ tokenType: "user", token: patron2.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron2.accessToken }); // When patron 1 continues with her session site she must retain her access // token even though the CPRs are adjacent. cy.adgangsplatformenLogin(patron1); - cy.verifyToken({ tokenType: "user", token: patron1.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron1.accessToken }); }); - it("handles logins with different CPRs", () => { + it('handles logins with different CPRs', () => { cy.adgangsplatformenLogin(patron1); - cy.verifyToken({ tokenType: "user", token: patron1.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron1.accessToken }); cy.adgangsplatformenLogin(patron3); - cy.verifyToken({ tokenType: "user", token: patron3.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron3.accessToken }); cy.adgangsplatformenLogin(patron1); - cy.verifyToken({ tokenType: "user", token: patron1.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron1.accessToken }); }); - it("handles logins with overlapping GUIDs", () => { + it('handles logins with overlapping GUIDs', () => { cy.adgangsplatformenLogin(patron4); - cy.verifyToken({ tokenType: "user", token: patron4.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron4.accessToken }); cy.adgangsplatformenLogin(patron5); - cy.verifyToken({ tokenType: "user", token: patron5.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron5.accessToken }); cy.adgangsplatformenLogin(patron4); - cy.verifyToken({ tokenType: "user", token: patron4.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron4.accessToken }); }); - it("handles logins with different GUIDs", () => { + it('handles logins with different GUIDs', () => { cy.adgangsplatformenLogin(patron4); - cy.verifyToken({ tokenType: "user", token: patron4.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron4.accessToken }); cy.adgangsplatformenLogin(patron6); - cy.verifyToken({ tokenType: "user", token: patron6.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron6.accessToken }); cy.adgangsplatformenLogin(patron4); - cy.verifyToken({ tokenType: "user", token: patron4.accessToken }); + cy.verifyToken({ tokenType: 'user', token: patron4.accessToken }); }); }); diff --git a/cypress/e2e/smoke-test.cy.ts b/cypress/e2e/smoke-test.cy.ts index 3f305b960..79138181b 100644 --- a/cypress/e2e/smoke-test.cy.ts +++ b/cypress/e2e/smoke-test.cy.ts @@ -1,15 +1,15 @@ -describe("DPL CMS", () => { - it("supports login", () => { +describe('DPL CMS', () => { + it('supports login', () => { cy.drupalLogin(); // We do not have a proper way to determine that the user is actually // logged in. For now we simply check whether the user is logged in. If that // is the case then the /user route will redirect to the user/id route. // Conversely when logged out the /user route will redirect to the // frontpage route. - cy.visit("/user") + cy.visit('/user') .url() - .should("match", /user\/\d+/); + .should('match', /user\/\d+/); cy.drupalLogout(); - cy.visit("user").url().should("match", /\//); + cy.visit('user').url().should('match', /\//); }); }); diff --git a/cypress/e2e/varnish.cy.ts b/cypress/e2e/varnish.cy.ts index e49e27a14..e95bff1fd 100644 --- a/cypress/e2e/varnish.cy.ts +++ b/cypress/e2e/varnish.cy.ts @@ -1,54 +1,54 @@ -import "cypress-if"; +import 'cypress-if'; const node = { - title: "Varnish test", - subtitle: "A subtitle", - path: "/articles/varnish-test", + title: 'Varnish test', + subtitle: 'A subtitle', + path: '/articles/varnish-test', }; -const varnishCacheHeader = "x-varnish-cache"; +const varnishCacheHeader = 'x-varnish-cache'; -describe("Varnish", () => { - it("is caching responses for anonymous users", () => { +describe('Varnish', () => { + it('is caching responses for anonymous users', () => { cy.anonymousUser(); // Query the front page twice to ensure that Varnish has had a chance to // cache the response. - cy.request("/"); - cy.request("/").then((response) => { - cy.log("Headers", response.headers); - expect(response.headers).to.have.property(varnishCacheHeader, "HIT"); + cy.request('/'); + cy.request('/').then((response) => { + cy.log('Headers', response.headers); + expect(response.headers).to.have.property(varnishCacheHeader, 'HIT'); }); }); - it("is purged when updating content", () => { + it('is purged when updating content', () => { // Create a node as admin. - cy.drupalLogin("/node/add/article"); - cy.findByLabelText("Title").type(node.title); - cy.findByRole("button", { name: "Save" }).click(); + cy.drupalLogin('/node/add/article'); + cy.findByLabelText('Title').type(node.title); + cy.findByRole('button', { name: 'Save' }).click(); cy.contains(node.title); - cy.should("not.contain", node.subtitle); + cy.should('not.contain', node.subtitle); // We do not have a good way to store the current path between tests so // instead we ensure that the expected path is correct. - cy.url().should("include", node.path); + cy.url().should('include', node.path); // Check that the node is accessible and rendered with the expected content // for anonymous users. cy.anonymousUser(); cy.visit(node.path); cy.contains(node.title); - cy.should("not.contain", node.subtitle); + cy.should('not.contain', node.subtitle); // Edit the page as admin and ensure that it is updated. cy.drupalLogin(); cy.visit(node.path); - cy.findByRole("link", { + cy.findByRole('link', { name: `Edit ${node.title}`, }).click({ // Use force as the toolbar may cover the Edit link. force: true, }); - cy.findByLabelText("Subtitle").type(node.subtitle); - cy.findByRole("button", { name: "Save" }).click(); + cy.findByLabelText('Subtitle').type(node.subtitle); + cy.findByRole('button', { name: 'Save' }).click(); cy.contains(node.title); cy.contains(node.subtitle); @@ -56,8 +56,8 @@ describe("Varnish", () => { // anonymous users. cy.anonymousUser(); cy.request(node.path).then((response) => { - cy.log("Headers", response.headers); - expect(response.headers).to.have.property(varnishCacheHeader, "MISS"); + cy.log('Headers', response.headers); + expect(response.headers).to.have.property(varnishCacheHeader, 'MISS'); }); cy.visit(node.path); cy.contains(node.title); @@ -65,29 +65,29 @@ describe("Varnish", () => { }); before(() => { - cy.drupalLogin("/admin/content"); + cy.drupalLogin('/admin/content'); // Delete all preexisting instances of the node. - cy.get("a") + cy.get('a') .contains(node.title) .if() .each(() => { // We have to repeat the selector as Cypress will otherwise complain about // missing references to elements when clicking the page. - cy.findAllByRole("link", { name: node.title }).first().click(); - cy.findByRole("link", { + cy.findAllByRole('link', { name: node.title }).first().click(); + cy.findByRole('link', { name: `Edit ${node.title}`, }).click(); - cy.findByRole("button", { name: "More actions" }) + cy.findByRole('button', { name: 'More actions' }) .click() .parent() - .findByRole("link", { name: "Delete" }) + .findByRole('link', { name: 'Delete' }) .click(); - cy.findByRole("dialog") - .findByRole("button", { name: "Delete" }) + cy.findByRole('dialog') + .findByRole('button', { name: 'Delete' }) .click(); // Return to the node list to prepare for the next iteration. - cy.visit("/admin/content"); + cy.visit('/admin/content'); }); cy.anonymousUser(); diff --git a/cypress/e2e/wiremock.cy.ts b/cypress/e2e/wiremock.cy.ts index 60753c264..bff1060c1 100644 --- a/cypress/e2e/wiremock.cy.ts +++ b/cypress/e2e/wiremock.cy.ts @@ -1,22 +1,22 @@ -describe("Wiremock", () => { - it("returns stubbed responses", () => { +describe('Wiremock', () => { + it('returns stubbed responses', () => { cy.createMapping({ request: { - method: "GET", - urlPath: "/smoke/test", + method: 'GET', + urlPath: '/smoke/test', }, response: { headers: { - "Content-Type": "application/json", + 'Content-Type': 'application/json', }, jsonBody: { success: true, }, }, }); - cy.request("http://dummy/smoke/test") - .its("body") - .should("deep.equal", { success: true }); + cy.request('http://dummy/smoke/test') + .its('body') + .should('deep.equal', { success: true }); }); beforeEach(() => { diff --git a/cypress/e2e/withMappings/advanced-search.cy.ts b/cypress/e2e/withMappings/advanced-search.cy.ts index 754532aed..96b13abf2 100644 --- a/cypress/e2e/withMappings/advanced-search.cy.ts +++ b/cypress/e2e/withMappings/advanced-search.cy.ts @@ -1,36 +1,36 @@ -describe("User journey", () => { - it("Can access the advanced search page from home page", () => { - cy.visit("/arrangementer").getBySel("search-header-dropdown-icon").click(); - cy.getBySel("search-header-dropdown").click(); - cy.url().should("include", "advanced-search"); - cy.get("h1").should("contain", "advanced search"); +describe('User journey', () => { + it('Can access the advanced search page from home page', () => { + cy.visit('/arrangementer').getBySel('search-header-dropdown-icon').click(); + cy.getBySel('search-header-dropdown').click(); + cy.url().should('include', 'advanced-search'); + cy.get('h1').should('contain', 'advanced search'); }); - it("Can fill out the search form, translate it into CQL & switch to CQL search with the same translation", () => { - cy.visit("/advanced-search"); - cy.getBySel("advanced-search-header-row").first().click().type("Harry"); - cy.getBySel("advanced-search-header-row").eq(1).click().type("Prince"); - cy.getBySel("advanced-search-header-row") + it('Can fill out the search form, translate it into CQL & switch to CQL search with the same translation', () => { + cy.visit('/advanced-search'); + cy.getBySel('advanced-search-header-row').first().click().type('Harry'); + cy.getBySel('advanced-search-header-row').eq(1).click().type('Prince'); + cy.getBySel('advanced-search-header-row') .eq(1) - .getBySel("clauses") - .getBySel("clause-NOT") + .getBySel('clauses') + .getBySel('clause-NOT') .click(); - cy.getBySel("preview-section") + cy.getBySel('preview-section') .first() - .should("contain", "'Harry' NOT 'Prince'"); - cy.getBySel("advanced-search-edit-cql").eq(1).click(); - cy.getBySel("cql-search-header-input").should( - "contain", - "'Harry' NOT 'Prince'" + .should('contain', "'Harry' NOT 'Prince'"); + cy.getBySel('advanced-search-edit-cql').eq(1).click(); + cy.getBySel('cql-search-header-input').should( + 'contain', + "'Harry' NOT 'Prince'", ); }); - it("Can search and show search results", () => { - cy.visit("/advanced-search"); - cy.getBySel("advanced-search-header-row").first().click().type("Harry"); - cy.getBySel("advanced-search-header-row").eq(1).click().type("Prince"); - cy.getBySel("search-button").click(); - cy.getBySel("search-result-list").should("exist"); - cy.getBySel("card-list-item").should("exist"); + it('Can search and show search results', () => { + cy.visit('/advanced-search'); + cy.getBySel('advanced-search-header-row').first().click().type('Harry'); + cy.getBySel('advanced-search-header-row').eq(1).click().type('Prince'); + cy.getBySel('search-button').click(); + cy.getBySel('search-result-list').should('exist'); + cy.getBySel('card-list-item').should('exist'); }); }); diff --git a/cypress/e2e/withMappings/user-journey.cy.ts b/cypress/e2e/withMappings/user-journey.cy.ts index 52ca012ce..056df611d 100644 --- a/cypress/e2e/withMappings/user-journey.cy.ts +++ b/cypress/e2e/withMappings/user-journey.cy.ts @@ -1,50 +1,50 @@ -describe("User journey", () => { - it("Shows search suggestions & redirects to search result page", () => { - cy.visit("/arrangementer") - .getBySel("search-header-input") - .type("harry") - .getBySel("autosuggest") - .should("be.visible") - .getBySel("autosuggest-text-item") +describe('User journey', () => { + it('Shows search suggestions & redirects to search result page', () => { + cy.visit('/arrangementer') + .getBySel('search-header-input') + .type('harry') + .getBySel('autosuggest') + .should('be.visible') + .getBySel('autosuggest-text-item') .first() .click() .url() - .should("include", "search?q=Harry%2520Potter"); + .should('include', 'search?q=Harry%2520Potter'); }); - it("Shows search results & redirects to material page", () => { - cy.visit("/search?q=Harry+Potter") - .getBySel("search-result-header") - .should("contain", 'Showing results for "Harry Potter"') - .getBySel("card-list-item-availability") - .should("exist"); + it('Shows search results & redirects to material page', () => { + cy.visit('/search?q=Harry+Potter') + .getBySel('search-result-header') + .should('contain', 'Showing results for "Harry Potter"') + .getBySel('card-list-item-availability') + .should('exist'); - cy.getBySel("card-list-item") + cy.getBySel('card-list-item') .first() .click() .url() - .should("include", "work/work-of:870970-basis:54181744"); + .should('include', 'work/work-of:870970-basis:54181744'); }); - it("Shows material page & reservation button is rendered", () => { - cy.visit("/work/work-of:870970-basis:54181744") - .getBySel("material-header-content") + it('Shows material page & reservation button is rendered', () => { + cy.visit('/work/work-of:870970-basis:54181744') + .getBySel('material-header-content') .scrollIntoView() - .contains("Harry Potter og Fønixordenen"); + .contains('Harry Potter og Fønixordenen'); // Wait for service to fill reserve button with the right text. // TODO: Consider using the pipe package in the future... // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.getBySel("material-header-buttons-physical").should( - "contain", - "Reserve bog" + cy.getBySel('material-header-buttons-physical').should( + 'contain', + 'Reserve bog', ); }); - it("Can open reservation modal & reserve a material", () => { - const authorizationCode = "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc"; - const accessToken = "447131b0a03fe0421204c54e5c21a60d70030fd1"; - const userGuid = "19a4ae39-be07-4db9-a8b7-8bbb29f03da6"; + it('Can open reservation modal & reserve a material', () => { + const authorizationCode = '7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc'; + const accessToken = '447131b0a03fe0421204c54e5c21a60d70030fd1'; + const userGuid = '19a4ae39-be07-4db9-a8b7-8bbb29f03da6'; const userCPR = 9999999999; cy.adgangsplatformenLogin({ authorizationCode, @@ -52,25 +52,25 @@ describe("User journey", () => { userCPR, userGuid, }); - cy.visit("/work/work-of:870970-basis:54181744"); - cy.getBySel("material-header-author-text").scrollIntoView(); - cy.getBySel("material-header-buttons-physical").click(); + cy.visit('/work/work-of:870970-basis:54181744'); + cy.getBySel('material-header-author-text').scrollIntoView(); + cy.getBySel('material-header-buttons-physical').click(); // We have to wait for the modal to be fully rendered. // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.getBySel("reservation-modal-parallel") - .should("be.visible") - .and("contain", "Harry Potter og Fønixordenen"); + cy.getBySel('reservation-modal-parallel') + .should('be.visible') + .and('contain', 'Harry Potter og Fønixordenen'); // We have to wait for the modal to be fully rendered // and the event listeners to be attached. // Read more: https://www.cypress.io/blog/2019/01/22/when-can-the-test-click/ // TODO: Consider using the pipe package in the future... // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.getBySel("reservation-modal-submit-button").click(); - cy.getBySel("reservation-success-title-text") - .should("exist") - .and("contain", "The material is available and is now reserved for you!"); + cy.getBySel('reservation-modal-submit-button').click(); + cy.getBySel('reservation-success-title-text') + .should('exist') + .and('contain', 'The material is available and is now reserved for you!'); }); afterEach(() => { diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 9b7bf294b..e187993b7 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -1,31 +1,31 @@ -import "@testing-library/cypress/add-commands"; -import { WireMockRestClient } from "wiremock-rest-client"; -import { Options } from "wiremock-rest-client/dist/model/options.model"; -import { StubMapping } from "wiremock-rest-client/dist/model/stub-mapping.model"; -import { RequestPattern } from "wiremock-rest-client/dist/model/request-pattern.model"; +import '@testing-library/cypress/add-commands'; +import { WireMockRestClient } from 'wiremock-rest-client'; +import { Options } from 'wiremock-rest-client/dist/model/options.model'; +import { StubMapping } from 'wiremock-rest-client/dist/model/stub-mapping.model'; +import { RequestPattern } from 'wiremock-rest-client/dist/model/request-pattern.model'; const wiremock = (baseUri?: string, options?: Options) => { return new WireMockRestClient( - baseUri || Cypress.env("WIREMOCK_URL"), - options + baseUri || Cypress.env('WIREMOCK_URL'), + options, ); }; -Cypress.Commands.add("createMapping", (stub: StubMapping) => { +Cypress.Commands.add('createMapping', (stub: StubMapping) => { cy.wrap(wiremock().mappings.createMapping(stub)); }); -Cypress.Commands.add("resetMappings", () => { +Cypress.Commands.add('resetMappings', () => { cy.wrap(wiremock().mappings.resetAllMappings()); }); -Cypress.Commands.add("logMappingRequests", () => { +Cypress.Commands.add('logMappingRequests', () => { cy.wrap( wiremock() .mappings.getAllMappings() .then((mappings) => { Cypress.log({ - name: "Wiremock", + name: 'Wiremock', message: `Mappings: ${mappings.meta.total}`, }); mappings.mappings.forEach((stub) => { @@ -38,30 +38,30 @@ Cypress.Commands.add("logMappingRequests", () => { stub.request.urlPath || stub.request.urlPathPattern; Cypress.log({ - name: "Wiremock", + name: 'Wiremock', message: `${stub.request.method}: ${requestUrlPath}: ${request.count} hit(s)`, }); }); }); - }) + }), ); }); -Cypress.Commands.add("getRequestCount", (request: RequestPattern) => { +Cypress.Commands.add('getRequestCount', (request: RequestPattern) => { cy.wrap( wiremock() .requests.getCount(request) .then((response: { count: number }) => { return response.count; - }) + }), ); }); -Cypress.Commands.add("resetRequests", () => { +Cypress.Commands.add('resetRequests', () => { cy.wrap(wiremock().requests.resetAllRequests()); }); -Cypress.Commands.add("logRequests", () => { +Cypress.Commands.add('logRequests', () => { cy.wrap( wiremock() .requests.getAllRequests() @@ -69,19 +69,19 @@ Cypress.Commands.add("logRequests", () => { data.requests.forEach((requestResponse) => { const request = requestResponse.request; Cypress.log({ - name: "Wiremock", + name: 'Wiremock', message: `${request.method}: ${request.url}`, }); }); - }) + }), ); }); -Cypress.Commands.add("drupalLogin", (url?: string) => { - const username = Cypress.env("DRUPAL_USERNAME"); - const password = Cypress.env("DRUPAL_PASSWORD"); +Cypress.Commands.add('drupalLogin', (url?: string) => { + const username = Cypress.env('DRUPAL_USERNAME'); + const password = Cypress.env('DRUPAL_PASSWORD'); cy.session({ username, password }, () => { - cy.visit("/user/login"); + cy.visit('/user/login'); cy.get('[name="name"]') .type(username) .parent() @@ -95,24 +95,24 @@ Cypress.Commands.add("drupalLogin", (url?: string) => { } }); -Cypress.Commands.add("anonymousUser", () => { - cy.session("anonymous", () => {}); +Cypress.Commands.add('anonymousUser', () => { + cy.session('anonymous', () => {}); }); -Cypress.Commands.add("drupalLogout", () => { - cy.visit("/logout"); +Cypress.Commands.add('drupalLogout', () => { + cy.visit('/logout'); }); -Cypress.Commands.add("drupalCron", () => { +Cypress.Commands.add('drupalCron', () => { // Because we run Wiremock as a proxy only services configured with the // proxy will use it. We need to proxy requests during cron and only the // web container is configured to use the proxy and thus we have to run // cron through the web frontend. Using the proxy with the CLI container would // cause too many irrelevant requests to pass throuh the proxy. cy.drupalLogin(); - cy.visit("/admin/config/system/cron"); + cy.visit('/admin/config/system/cron'); cy.get('[value="Run cron"]').click(); - cy.contains("Cron ran successfully."); + cy.contains('Cron ran successfully.'); cy.drupalLogout(); }); @@ -131,11 +131,11 @@ const adgangsplatformenLoginOauthMappings = ({ }) => { cy.createMapping({ request: { - method: "GET", - urlPath: "/oauth/authorize", + method: 'GET', + urlPath: '/oauth/authorize', queryParameters: { response_type: { - equalTo: "code", + equalTo: 'code', }, }, }, @@ -144,17 +144,17 @@ const adgangsplatformenLoginOauthMappings = ({ headers: { location: `{{request.query.[redirect_uri]}}?code=${authorizationCode}&state={{request.query.[state]}}`, }, - transformers: ["response-template"], + transformers: ['response-template'], }, }); cy.createMapping({ request: { - method: "POST", - urlPath: "/oauth/token/", + method: 'POST', + urlPath: '/oauth/token/', bodyPatterns: [ { - contains: "grant_type=authorization_code", + contains: 'grant_type=authorization_code', }, { contains: `code=${authorizationCode}`, @@ -164,7 +164,7 @@ const adgangsplatformenLoginOauthMappings = ({ response: { jsonBody: { access_token: accessToken, - token_type: "Bearer", + token_type: 'Bearer', expires_in: 2591999, }, }, @@ -172,8 +172,8 @@ const adgangsplatformenLoginOauthMappings = ({ cy.createMapping({ request: { - method: "GET", - urlPath: "/userinfo/", + method: 'GET', + urlPath: '/userinfo/', headers: { Authorization: { equalTo: `Bearer ${accessToken}`, @@ -192,7 +192,7 @@ const adgangsplatformenLoginOauthMappings = ({ const patronBody = (userIsAlreadyRegistered: boolean) => { return { - authenticateStatus: userIsAlreadyRegistered ? "VALID" : "INVALID", + authenticateStatus: userIsAlreadyRegistered ? 'VALID' : 'INVALID', patron: { // This is not a complete patron object but with regards to login/register we only need to ensure an empty blocked // status so we leave out all other information. @@ -203,8 +203,8 @@ const adgangsplatformenLoginOauthMappings = ({ cy.createMapping({ request: { - method: "GET", - urlPath: "/external/agencyid/patrons/patronid/v2", + method: 'GET', + urlPath: '/external/agencyid/patrons/patronid/v2', headers: { Authorization: { equalTo: `Bearer ${accessToken}`, @@ -218,7 +218,7 @@ const adgangsplatformenLoginOauthMappings = ({ }; Cypress.Commands.add( - "adgangsplatformenLogin", + 'adgangsplatformenLogin', ({ authorizationCode, accessToken, @@ -239,13 +239,13 @@ Cypress.Commands.add( userGuid, }); - cy.visit("/user/login"); - cy.contains("Log in with Adgangsplatformen").click(); + cy.visit('/user/login'); + cy.contains('Log in with Adgangsplatformen').click(); }); - } + }, ); Cypress.Commands.add( - "setupAdgangsplatformenRegisterMappinngs", + 'setupAdgangsplatformenRegisterMappinngs', ({ authorizationCode, accessToken, @@ -266,8 +266,8 @@ Cypress.Commands.add( }); cy.createMapping({ request: { - method: "POST", - urlPattern: ".*/external/agencyid/patrons/v4", + method: 'POST', + urlPattern: '.*/external/agencyid/patrons/v4', }, response: { jsonBody: { @@ -278,9 +278,9 @@ Cypress.Commands.add( }); cy.createMapping({ request: { - method: "GET", + method: 'GET', // TODO: Create more exact urlPatterns - urlPattern: ".*/fees.*", + urlPattern: '.*/fees.*', }, response: { jsonBody: {}, @@ -288,8 +288,8 @@ Cypress.Commands.add( }); cy.createMapping({ request: { - method: "GET", - urlPattern: ".*/reservations.*", + method: 'GET', + urlPattern: '.*/reservations.*', }, response: { jsonBody: {}, @@ -297,36 +297,36 @@ Cypress.Commands.add( }); cy.createMapping({ request: { - method: "GET", - urlPattern: ".*/loans.*", + method: 'GET', + urlPattern: '.*/loans.*', }, response: { jsonBody: {}, }, }); - } + }, ); Cypress.Commands.add( - "verifyToken", + 'verifyToken', ({ token, tokenType, }: { - tokenType: "library" | "user" | "unregistered-user"; + tokenType: 'library' | 'user' | 'unregistered-user'; token: string; }) => { - cy.request("/dpl-react/user-tokens") - .its("body") + cy.request('/dpl-react/user-tokens') + .its('body') .should( - "contain", - `window.dplReact.setToken("${tokenType}", "${token}")` + 'contain', + `window.dplReact.setToken("${tokenType}", "${token}")`, ); - } + }, ); -const visible = (checkVisible: boolean) => (checkVisible ? ":visible" : ""); -Cypress.Commands.add("getBySel", (selector, checkVisible = false, ...args) => { +const visible = (checkVisible: boolean) => (checkVisible ? ':visible' : ''); +Cypress.Commands.add('getBySel', (selector, checkVisible = false, ...args) => { return cy.get(`[data-cy="${selector}"]${visible(checkVisible)}`, ...args); }); @@ -359,7 +359,7 @@ declare global { userGuid?: string; }): Chainable; verifyToken(params: { - tokenType: "library" | "user" | "unregistered-user"; + tokenType: 'library' | 'user' | 'unregistered-user'; token: string; }): Chainable; getBySel( diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index f46af39bf..f8c05a625 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -14,9 +14,9 @@ // *********************************************************** // Import commands.ts using ES2015 syntax: -import "./commands"; +import './commands'; // Alternatively you can use CommonJS syntax: // require('./commands') -import "cypress-plugin-api"; +import 'cypress-plugin-api'; diff --git a/lagoon/conf/nginx/location_prepend_drupal_authorize.conf b/lagoon/conf/nginx/location_prepend_drupal_authorize.conf index 7ef179ee9..7fa9dee52 100644 --- a/lagoon/conf/nginx/location_prepend_drupal_authorize.conf +++ b/lagoon/conf/nginx/location_prepend_drupal_authorize.conf @@ -1,6 +1,5 @@ # This overrides the restriction in app.conf to access /core/authorize.php -# We need acces in order to upload modules in Drupal. +# We need access in order to upload modules in Drupal. location ~* ^(/core/authorize.php) { try_files /dev/null @php; } - diff --git a/lagoon/conf/nginx/location_prepend_drupal_update.conf b/lagoon/conf/nginx/location_prepend_drupal_update.conf new file mode 100644 index 000000000..4c67359c9 --- /dev/null +++ b/lagoon/conf/nginx/location_prepend_drupal_update.conf @@ -0,0 +1,14 @@ +# Allow access to update.php. Webmaster libraries need it so they can +# run updates when upgrading custom modules. Based on +# https://github.com/uselagoon/lagoon-images/issues/743 +location ~* ^(/update.php) { + # We need this instead of the simpler `try_files /dev/null @php;`, + # as update.php uses PATH_INFO. + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + include /etc/nginx/fastcgi.conf; + fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; + # update.php apparently doesn't set any Cache-Control header, so + # Nginx falls back to the 30 day default set up in the Lagoon + # nginx-drupal image if we don't explicitly kill it here. + expires off; +} diff --git a/lagoon/nginx.dockerfile b/lagoon/nginx.dockerfile index 8532b376a..c3ac2b19d 100644 --- a/lagoon/nginx.dockerfile +++ b/lagoon/nginx.dockerfile @@ -8,6 +8,9 @@ COPY --from=cli /app /app COPY lagoon/conf/nginx/location_prepend_drupal_authorize.conf /etc/nginx/conf.d/drupal/location_prepend_drupal_authorize.conf RUN fix-permissions /etc/nginx/conf.d/drupal/location_prepend_drupal_authorize.conf +COPY lagoon/conf/nginx/location_prepend_drupal_update.conf /etc/nginx/conf.d/drupal/location_prepend_drupal_update.conf +RUN fix-permissions /etc/nginx/conf.d/drupal/location_prepend_drupal_update.conf + COPY lagoon/conf/nginx/server_append_disable_varnish_static_files.conf /etc/nginx/conf.d/drupal/server_append_disable_varnish_static_files.conf RUN fix-permissions /etc/nginx/conf.d/drupal/server_append_disable_varnish_static_files.conf diff --git a/openapi.json b/openapi.json index c70dcede0..24d7fb509 100644 --- a/openapi.json +++ b/openapi.json @@ -12,6 +12,12 @@ "basic_auth": { "type": "basic" }, + "oauth2": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "http://varnish:8080/oauth/authorize", + "tokenUrl": "http://varnish:8080/oauth/token" + }, "csrf_token": { "type": "apiKey", "name": "X-CSRF-Token", @@ -23,6 +29,9 @@ { "basic_auth": [] }, + { + "oauth2": [] + }, { "csrf_token": [] } diff --git a/package.json b/package.json index e0e15eae1..294bf9099 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "@lhci/cli": "^0.8", "@testing-library/cypress": "^10.0.2", "@types/node": "^18.11.11", - "@typescript-eslint/eslint-plugin": "^8.15.0", - "@typescript-eslint/parser": "^8.15.0", + "@typescript-eslint/eslint-plugin": "^8.16.0", + "@typescript-eslint/parser": "^8.16.0", "chrome-launcher": "^0.15.1", - "cypress": "^13.15.2", + "cypress": "^13.16.0", "cypress-if": "^1.13.1", "cypress-plugin-api": "^2.11.2", "dayjs": "^1.11.13", @@ -23,7 +23,7 @@ "markdownlint-cli2": "^0.3.2", "pa11y-ci": "https://github.com/pa11y/pa11y-ci/archive/5c842cf1b9fe2867b70ff5354851d985be8d71c4.tar.gz", "prettier": "^2.7.1", - "typescript": "^5.6.3", + "typescript": "^5.7.2", "wiremock-rest-client": "^1.10.0" }, "scripts": { diff --git a/packages/cms-api/README.md b/packages/cms-api/README.md index 07285bdd5..0f0479980 100644 --- a/packages/cms-api/README.md +++ b/packages/cms-api/README.md @@ -84,6 +84,14 @@ class DefaultApi implements DefaultApiInterface // An interface is autogenerated // Retrieve logged in user from $apiKey ... } + /** + * Configure OAuth2 access token for authorization: oauth2 + */ + public function setoauth2($oauthToken) + { + // Retrieve logged in user from $oauthToken ... + } + /** * Implementation of DefaultApiInterface#campaignMatchPOST */ @@ -163,6 +171,13 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication +### oauth2 + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: http://varnish:8080/oauth/authorize +- **Scopes**: N/A + ### csrf_token - **Type**: API key diff --git a/patches/disable-core-upload-permission-check.diff b/patches/disable-core-upload-permission-check.diff deleted file mode 100644 index 1068223fa..000000000 --- a/patches/disable-core-upload-permission-check.diff +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/core/modules/update/src/Form/UpdateManagerInstall.php b/core/modules/update/src/Form/UpdateManagerInstall.php -index b7afcbad76..4fb8a18398 100644 ---- a/core/modules/update/src/Form/UpdateManagerInstall.php -+++ b/core/modules/update/src/Form/UpdateManagerInstall.php -@@ -245,7 +245,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { - // install the code, there's no need to prompt for FTP/SSH credentials. - // Instead, we instantiate a Drupal\Core\FileTransfer\Local and invoke - // update_authorize_run_install() directly. -- if (fileowner($project_real_location) == fileowner($this->sitePath) && !$test_authorize) { -+ // if (fileowner($project_real_location) == fileowner($this->sitePath) && !$test_authorize) { -+ if (!$test_authorize) { - $this->moduleHandler->loadInclude('update', 'inc', 'update.authorize'); - $filetransfer = new Local($this->root, \Drupal::service('file_system')); - $response = call_user_func_array('update_authorize_run_install', array_merge([$filetransfer], $arguments)); diff --git a/web/modules/custom/collation_fixer/collation_fixer.info.yml b/web/modules/custom/collation_fixer/collation_fixer.info.yml index 22b3d1853..e703da9a1 100644 --- a/web/modules/custom/collation_fixer/collation_fixer.info.yml +++ b/web/modules/custom/collation_fixer/collation_fixer.info.yml @@ -1,4 +1,4 @@ type: module -name: "Collation Fixer" -description: "Fix MySQL Collations" +name: 'Collation Fixer' +description: 'Fix MySQL Collations' core_version_requirement: ^10 diff --git a/web/modules/custom/collation_fixer/collation_fixer.permissions.yml b/web/modules/custom/collation_fixer/collation_fixer.permissions.yml index d26498460..c8cd20654 100644 --- a/web/modules/custom/collation_fixer/collation_fixer.permissions.yml +++ b/web/modules/custom/collation_fixer/collation_fixer.permissions.yml @@ -1,3 +1,3 @@ fix database collation: - title: "Fix database collation" - description: "Performs corrections of database collations." + title: 'Fix database collation' + description: 'Performs corrections of database collations.' diff --git a/web/modules/custom/collation_fixer/collation_fixer.routing.yml b/web/modules/custom/collation_fixer/collation_fixer.routing.yml index 5dceb15ca..008e4f6dc 100644 --- a/web/modules/custom/collation_fixer/collation_fixer.routing.yml +++ b/web/modules/custom/collation_fixer/collation_fixer.routing.yml @@ -1,7 +1,7 @@ collation_fixer.confirm: - path: "admin/collation-fixer/{table}/confirm" + path: 'admin/collation-fixer/{table}/confirm' defaults: - _title: "Fix collation" + _title: 'Fix collation' _form: 'Drupal\collation_fixer\Form\CollationFixerForm' requirements: - _permission: "fix database collation" + _permission: 'fix database collation' diff --git a/web/modules/custom/collation_fixer/collation_fixer.services.yml b/web/modules/custom/collation_fixer/collation_fixer.services.yml index abfd9b4dd..c6e3e9854 100644 --- a/web/modules/custom/collation_fixer/collation_fixer.services.yml +++ b/web/modules/custom/collation_fixer/collation_fixer.services.yml @@ -2,9 +2,9 @@ services: collation_fixer.collation_fixer: class: Drupal\collation_fixer\CollationFixer arguments: - - "@database" - - "@module_handler" - - "@entity_type.manager" - - "@entity_field.manager" + - '@database' + - '@module_handler' + - '@entity_type.manager' + - '@entity_field.manager' - Drupal\collation_fixer\CollationFixer: "@collation_fixer.collation_fixer" + Drupal\collation_fixer\CollationFixer: '@collation_fixer.collation_fixer' diff --git a/web/modules/custom/collation_fixer/drush.services.yml b/web/modules/custom/collation_fixer/drush.services.yml index 9627261db..fad719048 100644 --- a/web/modules/custom/collation_fixer/drush.services.yml +++ b/web/modules/custom/collation_fixer/drush.services.yml @@ -2,6 +2,6 @@ services: collation_fixer.commands: class: \Drupal\collation_fixer\Commands\CollationFixerCommands arguments: - - "@collation_fixer.collation_fixer" + - '@collation_fixer.collation_fixer' tags: - { name: drush.command } diff --git a/web/modules/custom/dpl_admin/assets/dpl_admin.js b/web/modules/custom/dpl_admin/assets/dpl_admin.js index 9352ef1bb..910c159ad 100644 --- a/web/modules/custom/dpl_admin/assets/dpl_admin.js +++ b/web/modules/custom/dpl_admin/assets/dpl_admin.js @@ -5,11 +5,11 @@ Drupal.behaviors.dpl_admin = { const dateTimeFields = context.querySelectorAll( '[type="date"][name$="[value][date]"]:not(.is-dpl-admin-range-initialized),' + - '[type="time"][name$="[value][time]"]:not(.is-dpl-admin-range-initialized)' + '[type="time"][name$="[value][time]"]:not(.is-dpl-admin-range-initialized)', ); dateTimeFields.forEach((input) => { - input.classList.add("is-dpl-admin-range-initialized"); + input.classList.add('is-dpl-admin-range-initialized'); that.dateRangeInit(input, context); }); }, @@ -17,7 +17,7 @@ Drupal.behaviors.dpl_admin = { // A helper function, adding X minutes to a time string ("14:15" => "14:30"). addMinutesToTime(timestring, minutesToAdd) { // Parse the input time string - const [hours, minutes] = timestring.split(":").map(Number); + const [hours, minutes] = timestring.split(':').map(Number); // Convert hours and minutes to minutes and add 15 minutes const totalMinutes = hours * 60 + minutes + minutesToAdd; @@ -30,8 +30,8 @@ Drupal.behaviors.dpl_admin = { const newMinutes = totalMinutes % 60; // Format the new time as HH:MM, padding with zeroes if necessary - const formattedHours = newHours.toString().padStart(2, "0"); - const formattedMinutes = newMinutes.toString().padStart(2, "0"); + const formattedHours = newHours.toString().padStart(2, '0'); + const formattedMinutes = newMinutes.toString().padStart(2, '0'); return `${formattedHours}:${formattedMinutes}`; }, @@ -39,15 +39,15 @@ Drupal.behaviors.dpl_admin = { // Set the start date as a default date for end date input fields. dateRangeInit(input, context) { const that = this; - const name = input.getAttribute("name"); + const name = input.getAttribute('name'); if (!name) { return; } // Create the name of the end date element based on the name of the start date element - const endValueName = name.replace("[value]", "[end_value]"); - input.addEventListener("change", () => { + const endValueName = name.replace('[value]', '[end_value]'); + input.addEventListener('change', () => { // Recurring events/Drupal appears to insert the end value input using // AJAX after altering the start value, despite the input already // existing. We cant really listen for that, so we'll do a poor-mans @@ -56,7 +56,7 @@ Drupal.behaviors.dpl_admin = { setTimeout(() => { let inputValue = input.value; - if (name.includes("[time]")) { + if (name.includes('[time]')) { inputValue = that.addMinutesToTime(inputValue, 60); } diff --git a/web/modules/custom/dpl_admin/dpl_admin.info.yml b/web/modules/custom/dpl_admin/dpl_admin.info.yml index 2f08fefc8..765976272 100644 --- a/web/modules/custom/dpl_admin/dpl_admin.info.yml +++ b/web/modules/custom/dpl_admin/dpl_admin.info.yml @@ -1,7 +1,7 @@ -name: "Admin" +name: 'Admin' type: module -description: "Functionality related to the admin/editor experience" -package: "DPL" +description: 'Functionality related to the admin/editor experience' +package: 'DPL' core_version_requirement: ^10 dependencies: diff --git a/web/modules/custom/dpl_admin/dpl_admin.links.action.yml b/web/modules/custom/dpl_admin/dpl_admin.links.action.yml index 772fa6f49..b68104519 100644 --- a/web/modules/custom/dpl_admin/dpl_admin.links.action.yml +++ b/web/modules/custom/dpl_admin/dpl_admin.links.action.yml @@ -1,6 +1,6 @@ dpl_admin.add_content: route_name: dpl_admin.add_content - title: "Add Content" + title: 'Add Content' appears_on: - events.admin.content - view.event_series_admin.page_1 diff --git a/web/modules/custom/dpl_admin/dpl_admin.links.menu.yml b/web/modules/custom/dpl_admin/dpl_admin.links.menu.yml index 306c0f8b4..47c2574ac 100644 --- a/web/modules/custom/dpl_admin/dpl_admin.links.menu.yml +++ b/web/modules/custom/dpl_admin/dpl_admin.links.menu.yml @@ -1,20 +1,20 @@ dpl_admin.add_content: - title: "Add content" + title: 'Add content' parent: system.admin_content route_name: dpl_admin.add_content weight: 5 dpl_admin.redirect: - title: "Redirects" + title: 'Redirects' parent: system.admin route_name: redirect.list weight: 10 dpl_admin.redirect_add: - title: "Add redirect" + title: 'Add redirect' parent: dpl_admin.redirect route_name: redirect.add weight: 1 dpl_admin.logout: - title: "Logout" + title: 'Logout' parent: system.admin route_name: user.logout weight: 9999 diff --git a/web/modules/custom/dpl_admin/dpl_admin.links.task.yml b/web/modules/custom/dpl_admin/dpl_admin.links.task.yml index 4f4749a19..dbec23132 100644 --- a/web/modules/custom/dpl_admin/dpl_admin.links.task.yml +++ b/web/modules/custom/dpl_admin/dpl_admin.links.task.yml @@ -1,11 +1,11 @@ dpl_admin.events: - title: "Event series" + title: 'Event series' route_name: view.event_series_admin.page_1 base_route: system.admin_content weight: 10 dpl_admin.media: - title: "Media" + title: 'Media' route_name: view.media_library.page base_route: system.admin_content weight: 5 diff --git a/web/modules/custom/dpl_admin/dpl_admin.permissions.yml b/web/modules/custom/dpl_admin/dpl_admin.permissions.yml index f7d98a991..78bbc55ba 100644 --- a/web/modules/custom/dpl_admin/dpl_admin.permissions.yml +++ b/web/modules/custom/dpl_admin/dpl_admin.permissions.yml @@ -1,2 +1,2 @@ dpl admin access pages: - title: "Access DPL admin pages" + title: 'Access DPL admin pages' diff --git a/web/modules/custom/dpl_admin/dpl_admin.routing.yml b/web/modules/custom/dpl_admin/dpl_admin.routing.yml index e9221c28e..539d14c2d 100644 --- a/web/modules/custom/dpl_admin/dpl_admin.routing.yml +++ b/web/modules/custom/dpl_admin/dpl_admin.routing.yml @@ -1,7 +1,7 @@ dpl_admin.add_content: - path: "/admin/content/add" + path: '/admin/content/add' defaults: _controller: '\Drupal\dpl_admin\Controller\AdminPages::addContentPage' - _title: "Add new content" + _title: 'Add new content' requirements: - _permission: "dpl admin access pages" + _permission: 'dpl admin access pages' diff --git a/web/modules/custom/dpl_article/dpl_article.info.yml b/web/modules/custom/dpl_article/dpl_article.info.yml index 1b024a53e..03693f9c4 100644 --- a/web/modules/custom/dpl_article/dpl_article.info.yml +++ b/web/modules/custom/dpl_article/dpl_article.info.yml @@ -1,5 +1,5 @@ -name: "Article" +name: 'Article' type: module -description: "Functionality related to creating article content." -package: "DPL" +description: 'Functionality related to creating article content.' +package: 'DPL' core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.info.yml b/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.info.yml index 5c9daa6ca..320a1576a 100644 --- a/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.info.yml +++ b/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.info.yml @@ -1,6 +1,6 @@ -name: "DPL Breadcrumb" +name: 'DPL Breadcrumb' type: module -description: "Breadcrumbs and automatic URL aliases, based on content structure." +description: 'Breadcrumbs and automatic URL aliases, based on content structure.' package: DPL core_version_requirement: ^10 dependencies: diff --git a/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.links.menu.yml b/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.links.menu.yml index c88161e9a..bdf6f7a7a 100644 --- a/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.links.menu.yml +++ b/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.links.menu.yml @@ -1,11 +1,11 @@ dpl_breadcrumb.breadcrumb_structure: - title: "Breadcrumb" + title: 'Breadcrumb' parent: system.admin route_name: entity.taxonomy_vocabulary.overview_form - route_parameters: { taxonomy_vocabulary: "breadcrumb_structure" } + route_parameters: { taxonomy_vocabulary: 'breadcrumb_structure' } weight: -8 dpl_breadcrumb.breadcrumb_structure_add: - title: "Add new" + title: 'Add new' parent: dpl_breadcrumb.breadcrumb_structure route_name: entity.taxonomy_term.add_form - route_parameters: { taxonomy_vocabulary: "breadcrumb_structure" } + route_parameters: { taxonomy_vocabulary: 'breadcrumb_structure' } diff --git a/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.services.yml b/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.services.yml index 525dc392a..e05639cf3 100644 --- a/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.services.yml +++ b/web/modules/custom/dpl_breadcrumb/dpl_breadcrumb.services.yml @@ -1,19 +1,19 @@ services: dpl_breadcrumb.logger: parent: logger.channel_base - arguments: ["dpl_breadcrumb"] + arguments: ['dpl_breadcrumb'] dpl_breadcrumb.breadcrumb_helper: class: Drupal\dpl_breadcrumb\Services\BreadcrumbHelper arguments: [ - "@entity_type.manager", - "@language_manager", - "@pathauto.alias_cleaner", - "@string_translation", - "@dpl_breadcrumb.logger", + '@entity_type.manager', + '@language_manager', + '@pathauto.alias_cleaner', + '@string_translation', + '@dpl_breadcrumb.logger', ] dpl_breadcrumb.redirect_structure_term: class: Drupal\dpl_breadcrumb\EventSubscriber\StructureTermRedirect - arguments: ["@dpl_breadcrumb.breadcrumb_helper"] + arguments: ['@dpl_breadcrumb.breadcrumb_helper'] tags: - { name: event_subscriber } diff --git a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.info.yml b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.info.yml index d61649277..7932f509f 100644 --- a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.info.yml +++ b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.info.yml @@ -1,5 +1,5 @@ -name: "DPL Cache settings" +name: 'DPL Cache settings' type: module -description: "Giving admins a clearer access to cache-clearing, and the consequences." -package: "DPL" +description: 'Giving admins a clearer access to cache-clearing, and the consequences.' +package: 'DPL' core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.links.menu.yml b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.links.menu.yml index 7f53f69e9..f189f4954 100644 --- a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.links.menu.yml +++ b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.links.menu.yml @@ -1,5 +1,5 @@ dpl_cache_settings.cache_clear: - title: "Clear cache" + title: 'Clear cache' route_name: dpl_cache_settings.settings_form parent: system.admin_config_development weight: 1000 diff --git a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.permissions.yml b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.permissions.yml index ce610e01d..d7042c941 100644 --- a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.permissions.yml +++ b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.permissions.yml @@ -1,8 +1,8 @@ access dpl cache settings: - title: "Access DPL cache settings" - description: "This includes permission for clearing caches." + title: 'Access DPL cache settings' + description: 'This includes permission for clearing caches.' restrict access: TRUE access drupal performance settings: - title: "Access Drupal performance settings" - description: "A custom permission, to replace the generic basic settings." + title: 'Access Drupal performance settings' + description: 'A custom permission, to replace the generic basic settings.' restrict access: TRUE diff --git a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.routing.yml b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.routing.yml index 3b9c49ec0..d1509ee6f 100644 --- a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.routing.yml +++ b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.routing.yml @@ -1,7 +1,7 @@ dpl_cache_settings.settings_form: - path: "/admin/dpl/cache_settings" + path: '/admin/dpl/cache_settings' defaults: _form: '\Drupal\dpl_cache_settings\Form\CacheSettingsForm' - _title: "Cache settings" + _title: 'Cache settings' requirements: - _permission: "access dpl cache settings" + _permission: 'access dpl cache settings' diff --git a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.services.yml b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.services.yml index 30f88cfab..171bea0eb 100644 --- a/web/modules/custom/dpl_cache_settings/dpl_cache_settings.services.yml +++ b/web/modules/custom/dpl_cache_settings/dpl_cache_settings.services.yml @@ -1,7 +1,7 @@ services: logger.channel.dpl_cache_settings: parent: logger.channel_base - arguments: ["dpl_cache_settings"] + arguments: ['dpl_cache_settings'] dpl_cache_settings.route_subscriber: class: Drupal\dpl_cache_settings\Routing\RouteSubscriber tags: diff --git a/web/modules/custom/dpl_campaign/dpl_campaign.info.yml b/web/modules/custom/dpl_campaign/dpl_campaign.info.yml index 23af7fc97..dff0d28f7 100644 --- a/web/modules/custom/dpl_campaign/dpl_campaign.info.yml +++ b/web/modules/custom/dpl_campaign/dpl_campaign.info.yml @@ -1,7 +1,7 @@ -name: "dpl_campaign" +name: 'dpl_campaign' type: module -description: "A module that deliveres possibility for campaign CRUD and integration with Dpl React Apps" -package: "DPL" +description: 'A module that deliveres possibility for campaign CRUD and integration with Dpl React Apps' +package: 'DPL' core_version_requirement: ^9 || ^10 dependencies: - drupal:serialization diff --git a/web/modules/custom/dpl_campaign/dpl_campaign.services.yml b/web/modules/custom/dpl_campaign/dpl_campaign.services.yml index 02e1621d5..88779f509 100644 --- a/web/modules/custom/dpl_campaign/dpl_campaign.services.yml +++ b/web/modules/custom/dpl_campaign/dpl_campaign.services.yml @@ -2,15 +2,15 @@ services: dpl_campaign.serializer: class: Symfony\Component\Serializer\Serializer arguments: - - ["@dpl_campaign.normalizer.object", "@dpl_campaign.normalizer.array"] - - ["@serializer.encoder.json", "@serializer.encoder.xml"] + - ['@dpl_campaign.normalizer.object', '@dpl_campaign.normalizer.array'] + - ['@serializer.encoder.json', '@serializer.encoder.xml'] dpl_campaign.normalizer.object: class: Symfony\Component\Serializer\Normalizer\ObjectNormalizer arguments: - null - null - null - - "@dpl_campaign.extractor.phpdoc" + - '@dpl_campaign.extractor.phpdoc' dpl_campaign.normalizer.array: class: Symfony\Component\Serializer\Normalizer\ArrayDenormalizer dpl_campaign.extractor.phpdoc: diff --git a/web/modules/custom/dpl_config_import/dpl_config_import.example.yaml b/web/modules/custom/dpl_config_import/dpl_config_import.example.yaml index b52aa8e74..8762ba363 100644 --- a/web/modules/custom/dpl_config_import/dpl_config_import.example.yaml +++ b/web/modules/custom/dpl_config_import/dpl_config_import.example.yaml @@ -3,12 +3,12 @@ configuration: # Values will be merged with existing values. system.site: # Configuration values can be set directly - slogan: "Imported by DPL config import" + slogan: 'Imported by DPL config import' # Nested configuration is also supported page: # All values in nested configuration must have a key. This is required to # support numeric configuration keys. - 403: "/user/login" + 403: '/user/login' modules: # Add module ids to install or uninstall diff --git a/web/modules/custom/dpl_config_import/dpl_config_import.links.menu.yml b/web/modules/custom/dpl_config_import/dpl_config_import.links.menu.yml index 9eae0010c..5b8803aa9 100644 --- a/web/modules/custom/dpl_config_import/dpl_config_import.links.menu.yml +++ b/web/modules/custom/dpl_config_import/dpl_config_import.links.menu.yml @@ -1,5 +1,5 @@ config.sync: - title: "Upload configuration" - description: "Upload and import configuration from a YAML file" + title: 'Upload configuration' + description: 'Upload and import configuration from a YAML file' route_name: dpl_config_upload.upload_form parent: system.admin_config_development diff --git a/web/modules/custom/dpl_config_import/dpl_config_import.routing.yml b/web/modules/custom/dpl_config_import/dpl_config_import.routing.yml index 0dd571aad..9ee93a1a0 100644 --- a/web/modules/custom/dpl_config_import/dpl_config_import.routing.yml +++ b/web/modules/custom/dpl_config_import/dpl_config_import.routing.yml @@ -1,7 +1,7 @@ dpl_config_upload.upload_form: - path: "/admin/config/configuration/import" + path: '/admin/config/configuration/import' defaults: _form: 'Drupal\dpl_config_import\Form\UploadForm' - _title: "Upload configuration" + _title: 'Upload configuration' requirements: - _permission: "import configuration,administer modules" + _permission: 'import configuration,administer modules' diff --git a/web/modules/custom/dpl_consumers/dpl_consumers.crud.php b/web/modules/custom/dpl_consumers/dpl_consumers.crud.php index 860a67d57..5ec51c90d 100644 --- a/web/modules/custom/dpl_consumers/dpl_consumers.crud.php +++ b/web/modules/custom/dpl_consumers/dpl_consumers.crud.php @@ -25,14 +25,31 @@ function dpl_consumers_create_user(): void { * Create a consumer. */ function dpl_consumers_create_consumer(): void { - $consumer = \Drupal::entityTypeManager()->getStorage('consumer')->create([ - 'label' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CONSUMER_LABEL, - 'id' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CONSUMER_ID, - 'client_id' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CLIENT_ID, - 'third_party' => FALSE, - ]); + $user = \Drupal::entityTypeManager() + ->getStorage('user') + ->loadByProperties(['name' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_USER_NAME]); + + $user = reset($user); + + if (empty($user)) { + return; + } - $consumer->save(); + $secret = getenv('GRAPHQL_CONSUMER_SECRET'); + + if ($secret) { + $consumer = \Drupal::entityTypeManager()->getStorage('consumer')->create([ + 'label' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_LABEL, + 'id' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CONSUMER_ID, + 'client_id' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CLIENT_ID, + 'secret' => $secret, + 'third_party' => FALSE, + 'user_id' => $user->id(), + 'roles' => [DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_ROLE_ID], + ]); + + $consumer->save(); + } } /** @@ -40,7 +57,6 @@ function dpl_consumers_create_consumer(): void { */ function dpl_consumers_delete_user(): void { try { - // Delete the user. $user = \Drupal::entityTypeManager() ->getStorage('user') ->loadByProperties(['name' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_USER_NAME]); @@ -61,17 +77,19 @@ function dpl_consumers_delete_user(): void { */ function dpl_consumers_delete_consumer(): void { try { - // Delete the consumer. $consumer = \Drupal::entityTypeManager() ->getStorage('consumer') - ->loadByProperties(['label' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CONSUMER_LABEL]); + ->loadByProperties(['client_id' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CLIENT_ID]); + // We assume that there is only one consumer with the given client ID + // as it is used an as unique identifier (machine name). if (!empty($consumer)) { $consumer = reset($consumer); $consumer->delete(); } } catch (\Exception $e) { + // We just log here in the deletion. It's not critical if it fails. \Drupal::logger('dpl_consumers')->error($e->getMessage()); } } diff --git a/web/modules/custom/dpl_consumers/dpl_consumers.deploy.php b/web/modules/custom/dpl_consumers/dpl_consumers.deploy.php index 7c2b50eb7..9ba5cff35 100644 --- a/web/modules/custom/dpl_consumers/dpl_consumers.deploy.php +++ b/web/modules/custom/dpl_consumers/dpl_consumers.deploy.php @@ -13,12 +13,17 @@ * Run consumer creation on deploy. * * We run the user and consumer creation in a deploy_hook instead of - * a install_hook, as we run into problems with the password_policy + * an install_hook, as we run into problems with the password_policy * module not being installed when we try to create the user. Doing * it this way instead, we make sure that everything is ready for the * user and consumer creation. + * + * We make sure to delete already existing user and consumers before + * as we don't want to create duplicates. */ -function dpl_consumers_deploy_create_user(): void { +function dpl_consumers_deploy_10001(): void { + dpl_consumers_delete_user(); + dpl_consumers_delete_consumer(); dpl_consumers_create_user(); dpl_consumers_create_consumer(); } diff --git a/web/modules/custom/dpl_consumers/dpl_consumers.info.yml b/web/modules/custom/dpl_consumers/dpl_consumers.info.yml index fe1089023..236686fda 100644 --- a/web/modules/custom/dpl_consumers/dpl_consumers.info.yml +++ b/web/modules/custom/dpl_consumers/dpl_consumers.info.yml @@ -1,8 +1,9 @@ -name: "DPL Consumers" +name: 'DPL Consumers' type: module -description: "Module for adding consumers to DPL CMS" +description: 'Module for adding consumers to DPL CMS' package: DPL core_version_requirement: ^10 || ^11 dependencies: - drupal:user - consumers:consumers + - simple_oauth:simple_oauth diff --git a/web/modules/custom/dpl_consumers/dpl_consumers.module b/web/modules/custom/dpl_consumers/dpl_consumers.module new file mode 100644 index 000000000..0eb0820fb --- /dev/null +++ b/web/modules/custom/dpl_consumers/dpl_consumers.module @@ -0,0 +1,36 @@ +getStorage('consumer') + ->loadByProperties(['client_id' => $client_id]); + + // We assume that there is only one consumer with the given client ID + // as it is used an as unique identifier (machine name). + if (!empty($consumer)) { + $consumer = reset($consumer); + + return $consumer->uuid() ?? throw new \Exception('UUID not found.'); + } + else { + throw new \Exception('Consumer not found.'); + } + } + catch (\Exception $e) { + throw new \Exception($e->getMessage()); + } +} diff --git a/web/modules/custom/dpl_consumers/drush.services.yml b/web/modules/custom/dpl_consumers/drush.services.yml new file mode 100644 index 000000000..ea4f51317 --- /dev/null +++ b/web/modules/custom/dpl_consumers/drush.services.yml @@ -0,0 +1,7 @@ +services: + dpl_consumer.commands: + class: \Drupal\dpl_consumers\Commands\DplConsumersCommands + arguments: + - '@entity_type.manager' + tags: + - { name: drush.command } diff --git a/web/modules/custom/dpl_consumers/src/Commands/DplConsumersCommands.php b/web/modules/custom/dpl_consumers/src/Commands/DplConsumersCommands.php new file mode 100644 index 000000000..f32d2341c --- /dev/null +++ b/web/modules/custom/dpl_consumers/src/Commands/DplConsumersCommands.php @@ -0,0 +1,78 @@ +entityTypeManager = $entityTypeManager; + } + + /** + * Function is used for setting the consumer secret. + * + * @command dpl_consumers:set-consumer-secret + * + * @throws \Exception + */ + public function setConsumerSecret(): string { + try { + /** @var \Drupal\Core\Entity\EntityStorageInterface $consumer */ + $consumer = $this->entityTypeManager + ->getStorage('consumer') + ->loadByProperties(['client_id' => DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CLIENT_ID]); + + $consumer = reset($consumer); + + $secret = getenv('GRAPHQL_CONSUMER_SECRET'); + if (!empty($secret)) { + $consumer->secret = $secret; + $consumer->save(); + + return 'Consumer secret set successfully.'; + } + else { + throw new \Exception('Consumer secret was not found.'); + } + } + catch (\Exception $e) { + throw new \Exception($e->getMessage()); + } + } + + /** + * Function is used for printing out the consumer credentials to the console. + * + * @command dpl_consumers:consumer-credentials + * + * @throws \Exception + */ + public function getConsumerCredentials(): void { + $graphql_consumer_client_id = DplGraphqlConsumersConstants::GRAPHQL_CONSUMER_CLIENT_ID; + $consumer_uuid = dpl_consumers_get_consumer_uuid($graphql_consumer_client_id); + $this->output()->writeln('Consumer UUID: ' . $consumer_uuid); + } + +} diff --git a/web/modules/custom/dpl_consumers/src/DplGraphqlConsumersConstants.php b/web/modules/custom/dpl_consumers/src/DplGraphqlConsumersConstants.php index f7210efbd..e97c69e23 100644 --- a/web/modules/custom/dpl_consumers/src/DplGraphqlConsumersConstants.php +++ b/web/modules/custom/dpl_consumers/src/DplGraphqlConsumersConstants.php @@ -13,7 +13,7 @@ class DplGraphqlConsumersConstants { const GRAPHQL_CONSUMER_USER_NAME = 'GraphQL Consumer'; - const GRAPHQL_CONSUMER_CONSUMER_LABEL = 'GraphQL Consumer'; + const GRAPHQL_CONSUMER_LABEL = 'GraphQL Consumer'; const GRAPHQL_CONSUMER_CONSUMER_ID = 'graphql_consumer'; diff --git a/web/modules/custom/dpl_cookies/dpl_cookies.info.yml b/web/modules/custom/dpl_cookies/dpl_cookies.info.yml index 09e6fe20f..6f1fbbf5c 100644 --- a/web/modules/custom/dpl_cookies/dpl_cookies.info.yml +++ b/web/modules/custom/dpl_cookies/dpl_cookies.info.yml @@ -1,6 +1,6 @@ -name: "DPL Cookies" +name: 'DPL Cookies' type: module -description: "A module that handles cookie functionality." +description: 'A module that handles cookie functionality.' package: DPL core_version_requirement: ^10 dependencies: diff --git a/web/modules/custom/dpl_dashboard/dpl_dashboard.links.menu.yml b/web/modules/custom/dpl_dashboard/dpl_dashboard.links.menu.yml index 3adcbaedd..af75cdd0a 100644 --- a/web/modules/custom/dpl_dashboard/dpl_dashboard.links.menu.yml +++ b/web/modules/custom/dpl_dashboard/dpl_dashboard.links.menu.yml @@ -1,5 +1,5 @@ dpl_dashboard.list: - title: "Dashboard" + title: 'Dashboard' menu_name: user-profile-menu route_name: dpl_dashboard.list - description: "User dashboard" + description: 'User dashboard' diff --git a/web/modules/custom/dpl_dashboard/dpl_dashboard.routing.yml b/web/modules/custom/dpl_dashboard/dpl_dashboard.routing.yml index f840295d2..9a3cdf1f1 100644 --- a/web/modules/custom/dpl_dashboard/dpl_dashboard.routing.yml +++ b/web/modules/custom/dpl_dashboard/dpl_dashboard.routing.yml @@ -1,6 +1,6 @@ dpl_dashboard.list: - path: "/user/me/dashboard" + path: '/user/me/dashboard' defaults: _controller: '\Drupal\dpl_dashboard\Controller\DplDashboardController::list' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_dashboard/dpl_dashboard.services.yml b/web/modules/custom/dpl_dashboard/dpl_dashboard.services.yml index ba5b010ba..78ce6143d 100644 --- a/web/modules/custom/dpl_dashboard/dpl_dashboard.services.yml +++ b/web/modules/custom/dpl_dashboard/dpl_dashboard.services.yml @@ -1,4 +1,4 @@ services: dpl_dashboard.settings: class: Drupal\dpl_dashboard\DplDashboardSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_error_pages/content/node/d6fe11c3-4776-4e40-9527-29d5066311aa.yml b/web/modules/custom/dpl_error_pages/content/node/d6fe11c3-4776-4e40-9527-29d5066311aa.yml index d38c8768e..a85205614 100644 --- a/web/modules/custom/dpl_error_pages/content/node/d6fe11c3-4776-4e40-9527-29d5066311aa.yml +++ b/web/modules/custom/dpl_error_pages/content/node/d6fe11c3-4776-4e40-9527-29d5066311aa.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: d6fe11c3-4776-4e40-9527-29d5066311aa bundle: page @@ -14,7 +14,7 @@ default: uid: - target_id: 1 title: - - value: "Adgang nægtet" + - value: 'Adgang nægtet' created: - value: 1710763872 promote: @@ -27,15 +27,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Adgang nægtet | DPL CMS" + content: 'Adgang nægtet | DPL CMS' path: - alias: /error-page-403 langcode: und @@ -44,7 +44,7 @@ default: field_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: dc7e8942-095d-448c-8b09-235a39f276c3 bundle: text_body @@ -59,5 +59,5 @@ default: revision_translation_affected: - value: true field_body: - - value: "

Beklager, du har ikke adgang til denne side

Vi beklager ulejligheden, men det ser ud til, at du ikke har de nødvendige tilladelser til at få adgang til denne del af vores hjemmeside.

Hvis du tror, dette er en fejl, eller hvis du har brug for adgang, vil vi meget gerne høre fra dig. Kontakt os venligst, eller vend tilbage til vores hovedside.

" + - value: '

Beklager, du har ikke adgang til denne side

Vi beklager ulejligheden, men det ser ud til, at du ikke har de nødvendige tilladelser til at få adgang til denne del af vores hjemmeside.

Hvis du tror, dette er en fejl, eller hvis du har brug for adgang, vil vi meget gerne høre fra dig. Kontakt os venligst, eller vend tilbage til vores hovedside.

' format: basic diff --git a/web/modules/custom/dpl_error_pages/content/node/f14e3e68-6bd1-44f3-a61c-108967cc68e8.yml b/web/modules/custom/dpl_error_pages/content/node/f14e3e68-6bd1-44f3-a61c-108967cc68e8.yml index 8953466b1..75f4b9471 100644 --- a/web/modules/custom/dpl_error_pages/content/node/f14e3e68-6bd1-44f3-a61c-108967cc68e8.yml +++ b/web/modules/custom/dpl_error_pages/content/node/f14e3e68-6bd1-44f3-a61c-108967cc68e8.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: f14e3e68-6bd1-44f3-a61c-108967cc68e8 bundle: page @@ -14,7 +14,7 @@ default: uid: - target_id: 1 title: - - value: "Siden blev ikke fundet" + - value: 'Siden blev ikke fundet' created: - value: 1710763252 promote: @@ -27,15 +27,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Siden blev ikke fundet | DPL CMS" + content: 'Siden blev ikke fundet | DPL CMS' path: - alias: /error-page-404 langcode: und @@ -44,7 +44,7 @@ default: field_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: f55bc166-35c2-45d5-a44a-edcffd37c828 bundle: text_body @@ -59,5 +59,5 @@ default: revision_translation_affected: - value: true field_body: - - value: "

Vi kan desværre ikke finde den side, du søger

Ups!

Det ser ud til, at siden, du leder efter, ikke eksisterer. Det kan være, den er blevet flyttet, eller et link er blevet fejlagtigt indtastet.

Men fortvivl ikke! Brug menuen ovenfor til at navigere tilbage til vores hjemmeside, eller prøv at bruge søgefunktionen til at finde det, du leder efter. Vi er her for at hjælpe dig med at finde vej.

" + - value: '

Vi kan desværre ikke finde den side, du søger

Ups!

Det ser ud til, at siden, du leder efter, ikke eksisterer. Det kan være, den er blevet flyttet, eller et link er blevet fejlagtigt indtastet.

Men fortvivl ikke! Brug menuen ovenfor til at navigere tilbage til vores hjemmeside, eller prøv at bruge søgefunktionen til at finde det, du leder efter. Vi er her for at hjælpe dig med at finde vej.

' format: basic diff --git a/web/modules/custom/dpl_event/dpl_event.info.yml b/web/modules/custom/dpl_event/dpl_event.info.yml index e3355de88..67546bef4 100644 --- a/web/modules/custom/dpl_event/dpl_event.info.yml +++ b/web/modules/custom/dpl_event/dpl_event.info.yml @@ -1,6 +1,6 @@ -name: "Event" +name: 'Event' type: module -description: "Custom handling related to events." +description: 'Custom handling related to events.' package: DPL core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_event/dpl_event.routing.yml b/web/modules/custom/dpl_event/dpl_event.routing.yml index f10a033fc..644dbd40f 100644 --- a/web/modules/custom/dpl_event/dpl_event.routing.yml +++ b/web/modules/custom/dpl_event/dpl_event.routing.yml @@ -1,7 +1,7 @@ dpl_event.settings: - path: "/admin/config/dpl-event/settings" + path: '/admin/config/dpl-event/settings' defaults: - _title: "Event settings" + _title: 'Event settings' _form: 'Drupal\dpl_event\Form\SettingsForm' requirements: - _permission: "administer library agency configuration" + _permission: 'administer library agency configuration' diff --git a/web/modules/custom/dpl_event/dpl_event.services.yml b/web/modules/custom/dpl_event/dpl_event.services.yml index 30cfebbd8..4a47f1a01 100644 --- a/web/modules/custom/dpl_event/dpl_event.services.yml +++ b/web/modules/custom/dpl_event/dpl_event.services.yml @@ -1,38 +1,38 @@ services: dpl_event.logger: parent: logger.channel_base - arguments: ["dpl_event"] + arguments: ['dpl_event'] dpl_event.event_instance_storage: class: \Drupal\recurring_events\EventInstanceStorage - factory: ["@entity_type.manager", "getStorage"] - arguments: ["eventinstance"] + factory: ['@entity_type.manager', 'getStorage'] + arguments: ['eventinstance'] dpl_event.price_formatter: class: Drupal\dpl_event\PriceFormatter - arguments: ["@string_translation", "@config.factory"] + arguments: ['@string_translation', '@config.factory'] dpl_event.reoccurring_date_formatter: class: Drupal\dpl_event\ReoccurringDateFormatter arguments: - ["@string_translation", "@entity_type.manager", "@date.formatter"] + ['@string_translation', '@entity_type.manager', '@date.formatter'] dpl_event.occurred_schedule: class: Drupal\dpl_event\Workflows\OccurredSchedule arguments: - - "@dpl_event.logger" - - "@datetime.time" - - "@job_scheduler.manager" - - "@dpl_event.event_instance_storage" + - '@dpl_event.logger' + - '@datetime.time' + - '@job_scheduler.manager' + - '@dpl_event.event_instance_storage' dpl_event.unpublish_schedule: class: Drupal\dpl_event\Workflows\UnpublishSchedule arguments: - - "@dpl_event.logger" - - "@datetime.time" - - "@job_scheduler.manager" - - "@dpl_event.event_instance_storage" - - "@config.factory" + - '@dpl_event.logger' + - '@datetime.time' + - '@job_scheduler.manager' + - '@dpl_event.event_instance_storage' + - '@config.factory' dpl_event.event_rest_mapper: class: Drupal\dpl_event\Services\EventRestMapper arguments: - - "@file_url_generator" - - "@config.factory" + - '@file_url_generator' + - '@config.factory' dpl_event.route_subscriber: class: Drupal\dpl_event\Routing\RouteSubscriber tags: @@ -40,7 +40,7 @@ services: dpl_event.access_event_instances_tab: class: Drupal\dpl_event\Access\EventSeriesTabAccessCheck arguments: - - "@entity_type.manager" + - '@entity_type.manager' tags: - { name: access_check, applies_to: _access_event_series_instances_tab } dpl_event.event_series_redirect: diff --git a/web/modules/custom/dpl_example_breadcrumb/dpl_example_breadcrumb.info.yml b/web/modules/custom/dpl_example_breadcrumb/dpl_example_breadcrumb.info.yml index 031e9e22b..a279f09a5 100644 --- a/web/modules/custom/dpl_example_breadcrumb/dpl_example_breadcrumb.info.yml +++ b/web/modules/custom/dpl_example_breadcrumb/dpl_example_breadcrumb.info.yml @@ -1,6 +1,6 @@ name: Example content for DPL Breadcrumb type: module -description: "This module was used for breadcrumb content, it is now deprecated." +description: 'This module was used for breadcrumb content, it is now deprecated.' package: DPL core_version_requirement: ^9 || ^10 dependencies: diff --git a/web/modules/custom/dpl_favorites_list/dpl_favorites_list.links.menu.yml b/web/modules/custom/dpl_favorites_list/dpl_favorites_list.links.menu.yml index a329794ae..913f59e1c 100644 --- a/web/modules/custom/dpl_favorites_list/dpl_favorites_list.links.menu.yml +++ b/web/modules/custom/dpl_favorites_list/dpl_favorites_list.links.menu.yml @@ -1,5 +1,5 @@ dpl_favorite.list: - title: "Favorites" + title: 'Favorites' menu_name: user-profile-menu route_name: dpl_favorites.list - description: "List user favorites" + description: 'List user favorites' diff --git a/web/modules/custom/dpl_favorites_list/dpl_favorites_list.routing.yml b/web/modules/custom/dpl_favorites_list/dpl_favorites_list.routing.yml index bc57e7854..db1598366 100644 --- a/web/modules/custom/dpl_favorites_list/dpl_favorites_list.routing.yml +++ b/web/modules/custom/dpl_favorites_list/dpl_favorites_list.routing.yml @@ -1,6 +1,6 @@ dpl_favorites_list.list: - path: "/user/me/favorites" + path: '/user/me/favorites' defaults: _controller: '\Drupal\dpl_favorites_list\Controller\DplFavoritesListController::list' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_favorites_list/dpl_favorites_list.services.yml b/web/modules/custom/dpl_favorites_list/dpl_favorites_list.services.yml index 228177877..afe6ff8ea 100644 --- a/web/modules/custom/dpl_favorites_list/dpl_favorites_list.services.yml +++ b/web/modules/custom/dpl_favorites_list/dpl_favorites_list.services.yml @@ -1,4 +1,4 @@ services: dpl_favorites_list.settings: class: Drupal\dpl_favorites_list\DplFavoritesListSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.links.menu.yml b/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.links.menu.yml index 8c9b22236..786f01904 100644 --- a/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.links.menu.yml +++ b/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.links.menu.yml @@ -1,5 +1,5 @@ dpl_favorites_list_material_component.list: - title: "Favorites list material component" + title: 'Favorites list material component' menu_name: user-profile-menu route_name: dpl_favorites_list_material_component.list - description: "Show favorites list material component" + description: 'Show favorites list material component' diff --git a/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.routing.yml b/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.routing.yml index ff440553f..ffd2050b4 100644 --- a/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.routing.yml +++ b/web/modules/custom/dpl_favorites_list_material_component/dpl_favorites_list_material_component.routing.yml @@ -1,6 +1,6 @@ dpl_favorites_list_material_component.list: - path: "/favorites-mc" + path: '/favorites-mc' defaults: _controller: '\Drupal\dpl_favorites_list_material_component\Controller\DplFavoritesListMaterialComponentController::list' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_fbs/dpl_fbs.links.menu.yml b/web/modules/custom/dpl_fbs/dpl_fbs.links.menu.yml index 2cb6cff4a..97df5a474 100644 --- a/web/modules/custom/dpl_fbs/dpl_fbs.links.menu.yml +++ b/web/modules/custom/dpl_fbs/dpl_fbs.links.menu.yml @@ -1,5 +1,5 @@ dpl_fbs.settings_form: - title: "FBS settings" + title: 'FBS settings' route_name: dpl_fbs.settings - description: "Change basic FBS settings" + description: 'Change basic FBS settings' parent: system.admin_config_services diff --git a/web/modules/custom/dpl_fbs/dpl_fbs.routing.yml b/web/modules/custom/dpl_fbs/dpl_fbs.routing.yml index b7423d402..130ed95f6 100644 --- a/web/modules/custom/dpl_fbs/dpl_fbs.routing.yml +++ b/web/modules/custom/dpl_fbs/dpl_fbs.routing.yml @@ -1,9 +1,9 @@ dpl_fbs.settings: - path: "/admin/config/services/fbs" + path: '/admin/config/services/fbs' defaults: _form: '\Drupal\dpl_fbs\Form\FbsSettingsForm' - _title: "FBS settings" + _title: 'FBS settings' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_fbs/dpl_fbs.services.yml b/web/modules/custom/dpl_fbs/dpl_fbs.services.yml index 02cbd9904..544831182 100644 --- a/web/modules/custom/dpl_fbs/dpl_fbs.services.yml +++ b/web/modules/custom/dpl_fbs/dpl_fbs.services.yml @@ -2,5 +2,5 @@ services: dpl_fbs.api_factory: class: Drupal\dpl_fbs\FbsApiFactory arguments: - - "@config.manager" - - "@http_client" + - '@config.manager' + - '@http_client' diff --git a/web/modules/custom/dpl_fees/dpl_fees.links.menu.yml b/web/modules/custom/dpl_fees/dpl_fees.links.menu.yml index 4afae2a2c..308dc36d7 100644 --- a/web/modules/custom/dpl_fees/dpl_fees.links.menu.yml +++ b/web/modules/custom/dpl_fees/dpl_fees.links.menu.yml @@ -1,11 +1,11 @@ dpl_fees.list: - title: "Fees" + title: 'Fees' menu_name: user-profile-menu route_name: dpl_fees.list - description: "List user fees" + description: 'List user fees' dpl_fees.settings_form: - title: "Fees List settings" + title: 'Fees List settings' route_name: dpl_fees.settings - description: "Change Fees List Settings" + description: 'Change Fees List Settings' parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_fees/dpl_fees.routing.yml b/web/modules/custom/dpl_fees/dpl_fees.routing.yml index 85155b391..232c8605a 100644 --- a/web/modules/custom/dpl_fees/dpl_fees.routing.yml +++ b/web/modules/custom/dpl_fees/dpl_fees.routing.yml @@ -1,16 +1,16 @@ dpl_fees.list: - path: "/user/me/fees" + path: '/user/me/fees' defaults: _controller: '\Drupal\dpl_fees\Controller\DplFeesController::list' requirements: - _permission: "access content" + _permission: 'access content' dpl_fees.settings: - path: "/admin/config/dpl-library-agency/fees" + path: '/admin/config/dpl-library-agency/fees' defaults: _form: '\Drupal\dpl_fees\Form\FeesListSettingsForm' - _title: "Fees settings" + _title: 'Fees settings' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_fees/dpl_fees.services.yml b/web/modules/custom/dpl_fees/dpl_fees.services.yml index 500c8bbc1..b711016a4 100644 --- a/web/modules/custom/dpl_fees/dpl_fees.services.yml +++ b/web/modules/custom/dpl_fees/dpl_fees.services.yml @@ -1,4 +1,4 @@ services: dpl_fees.settings: class: Drupal\dpl_fees\DplFeesSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_filter_paragraphs/dpl_filter_paragraphs.info.yml b/web/modules/custom/dpl_filter_paragraphs/dpl_filter_paragraphs.info.yml index 0e2e357f6..684443737 100644 --- a/web/modules/custom/dpl_filter_paragraphs/dpl_filter_paragraphs.info.yml +++ b/web/modules/custom/dpl_filter_paragraphs/dpl_filter_paragraphs.info.yml @@ -1,6 +1,6 @@ -name: "DPL Filtered Paragraphs (Deprecated)" +name: 'DPL Filtered Paragraphs (Deprecated)' type: module -description: "This module is deprecated, and will be deleted in the future." -package: "DPL" +description: 'This module is deprecated, and will be deleted in the future.' +package: 'DPL' core_version_requirement: ^10 hidden: true diff --git a/web/modules/custom/dpl_footer/dpl_footer.info.yml b/web/modules/custom/dpl_footer/dpl_footer.info.yml index 3b333010b..b7603a7a1 100644 --- a/web/modules/custom/dpl_footer/dpl_footer.info.yml +++ b/web/modules/custom/dpl_footer/dpl_footer.info.yml @@ -1,7 +1,7 @@ -name: "Footer" +name: 'Footer' type: module -description: "Functionality related to footer." -package: "DPL" +description: 'Functionality related to footer.' +package: 'DPL' core_version_requirement: ^10 dependencies: - multivalue_form_element:multivalue_form_element diff --git a/web/modules/custom/dpl_footer/dpl_footer.links.menu.yml b/web/modules/custom/dpl_footer/dpl_footer.links.menu.yml index 5c1993bac..5f5a66da2 100644 --- a/web/modules/custom/dpl_footer/dpl_footer.links.menu.yml +++ b/web/modules/custom/dpl_footer/dpl_footer.links.menu.yml @@ -1,5 +1,5 @@ dpl_footer.footer_form: - title: "Footer Settings" + title: 'Footer Settings' parent: system.admin_content route_name: dpl_footer.footer_form weight: 100 diff --git a/web/modules/custom/dpl_footer/dpl_footer.permissions.yml b/web/modules/custom/dpl_footer/dpl_footer.permissions.yml index 72a38b562..2a3c7815f 100644 --- a/web/modules/custom/dpl_footer/dpl_footer.permissions.yml +++ b/web/modules/custom/dpl_footer/dpl_footer.permissions.yml @@ -1,2 +1,2 @@ administer dpl_footer settings: - title: "Administer DPL footer settings" + title: 'Administer DPL footer settings' diff --git a/web/modules/custom/dpl_footer/dpl_footer.routing.yml b/web/modules/custom/dpl_footer/dpl_footer.routing.yml index 9b0971c6e..0d08ab614 100644 --- a/web/modules/custom/dpl_footer/dpl_footer.routing.yml +++ b/web/modules/custom/dpl_footer/dpl_footer.routing.yml @@ -1,7 +1,7 @@ dpl_footer.footer_form: - path: "/admin/structure/footer" + path: '/admin/structure/footer' defaults: _form: 'Drupal\dpl_footer\Form\FooterForm' - _title: "Footer Settings" + _title: 'Footer Settings' requirements: - _permission: "administer dpl_footer settings" + _permission: 'administer dpl_footer settings' diff --git a/web/modules/custom/dpl_graphql/dpl_graphql.info.yml b/web/modules/custom/dpl_graphql/dpl_graphql.info.yml index 4f1562cc1..67ff5385b 100644 --- a/web/modules/custom/dpl_graphql/dpl_graphql.info.yml +++ b/web/modules/custom/dpl_graphql/dpl_graphql.info.yml @@ -1,9 +1,11 @@ -name: "DPL GraphQL" +name: 'DPL GraphQL' type: module -description: "Module used for handling graphql functionality." +description: 'Module used for handling graphql functionality.' package: DPL core_version_requirement: ^10 || ^11 dependencies: - graphql:graphql - graphql_compose:graphql_compose - dpl_unilogin:dpl_unilogin + - simple_oauth:simple_oauth + - dpl_consumers:dpl_consumers diff --git a/web/modules/custom/dpl_graphql/dpl_graphql.install b/web/modules/custom/dpl_graphql/dpl_graphql.install new file mode 100644 index 000000000..ca908aff5 --- /dev/null +++ b/web/modules/custom/dpl_graphql/dpl_graphql.install @@ -0,0 +1,48 @@ +realpath('private://'); + $path = $private_files_path . '/simple_oauth_keys'; + $file_system->prepareDirectory($path, FileSystemInterface::CREATE_DIRECTORY); + + try { + $key_generator->generateKeys($path); + } + catch (ExtensionNotLoadedException | FilesystemValidationException $e) { + return $e->getMessage(); + } + + return "Public and private key for simple_oauth generated successfully."; +} diff --git a/web/modules/custom/dpl_graphql/dpl_graphql.services.yml b/web/modules/custom/dpl_graphql/dpl_graphql.services.yml new file mode 100644 index 000000000..32dc59db5 --- /dev/null +++ b/web/modules/custom/dpl_graphql/dpl_graphql.services.yml @@ -0,0 +1,5 @@ +services: + dpl_graphql.page_cache_request_policy.disallow_oauth2_token_requests: + class: Drupal\dpl_graphql\PageCache\DplDisallowSimpleOauthRequests + decorates: simple_oauth.page_cache_request_policy.disallow_oauth2_token_requests + decoration_on_invalid: ignore diff --git a/web/modules/custom/dpl_graphql/src/PageCache/DplDisallowSimpleOauthRequests.php b/web/modules/custom/dpl_graphql/src/PageCache/DplDisallowSimpleOauthRequests.php new file mode 100644 index 000000000..580cae9ac --- /dev/null +++ b/web/modules/custom/dpl_graphql/src/PageCache/DplDisallowSimpleOauthRequests.php @@ -0,0 +1,40 @@ +getPathInfo(), '/graphql') !== 0) { + return FALSE; + } + + // Check the header. See: http://tools.ietf.org/html/rfc6750#section-2.1 + // We have to perform also an exact match, as if no token is provided then + // the LWS might be stripped, but we still have to detect this as OAuth2 + // authentication. See: https://www.ietf.org/rfc/rfc2616.txt + $auth_header = trim($request->headers->get('Authorization') ?? ''); + return (strpos($auth_header, 'Bearer ') !== FALSE) || ($auth_header === 'Bearer'); + } + + /** + * {@inheritdoc} + */ + public function check(Request $request) { + return $this->isOauth2Request($request) ? static::DENY : NULL; + } + +} diff --git a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.links.menu.yml b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.links.menu.yml index b0c6fc0a9..547efdf30 100644 --- a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.links.menu.yml +++ b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.links.menu.yml @@ -1,5 +1,5 @@ dpl_instant_loan.settings_form: - title: "Instant Loan Settings" + title: 'Instant Loan Settings' route_name: dpl_instant_loan.settings - description: "Configure promotion of materials available for instant loans." + description: 'Configure promotion of materials available for instant loans.' parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.permissions.yml b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.permissions.yml index 42de74d78..57c37984c 100644 --- a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.permissions.yml +++ b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.permissions.yml @@ -1,3 +1,3 @@ administer instant loan configuration: - title: "Administer instant loan configuration" - description: "Access for administering of the instant loan configuration." + title: 'Administer instant loan configuration' + description: 'Access for administering of the instant loan configuration.' diff --git a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.routing.yml b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.routing.yml index 89a124ecf..836f1c3b4 100644 --- a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.routing.yml +++ b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.routing.yml @@ -1,9 +1,9 @@ dpl_instant_loan.settings: - path: "/admin/config/dpl-library-agency/instant-loan" + path: '/admin/config/dpl-library-agency/instant-loan' defaults: _form: '\Drupal\dpl_instant_loan\Form\DplInstantLoanSettingsForm' - _title: "Instant loan settings" + _title: 'Instant loan settings' requirements: - _permission: "administer instant loan configuration" + _permission: 'administer instant loan configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.services.yml b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.services.yml index 854943f23..ea06e9d9a 100644 --- a/web/modules/custom/dpl_instant_loan/dpl_instant_loan.services.yml +++ b/web/modules/custom/dpl_instant_loan/dpl_instant_loan.services.yml @@ -1,4 +1,4 @@ services: dpl_instant_loan.settings: class: Drupal\dpl_instant_loan\DplInstantLoanSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_library_agency/dpl_library_agency.info.yml b/web/modules/custom/dpl_library_agency/dpl_library_agency.info.yml index 57fab59fa..2b4780e13 100644 --- a/web/modules/custom/dpl_library_agency/dpl_library_agency.info.yml +++ b/web/modules/custom/dpl_library_agency/dpl_library_agency.info.yml @@ -1,7 +1,7 @@ -name: "DPL Library Agency" +name: 'DPL Library Agency' type: module -description: "Module for handling library agency configuration and functionality" -package: "DPL" +description: 'Module for handling library agency configuration and functionality' +package: 'DPL' core_version_requirement: ^9 || ^10 dependencies: - dpl_fbs:dpl_fbs diff --git a/web/modules/custom/dpl_library_agency/dpl_library_agency.links.menu.yml b/web/modules/custom/dpl_library_agency/dpl_library_agency.links.menu.yml index 1f7037c76..fdec80a32 100644 --- a/web/modules/custom/dpl_library_agency/dpl_library_agency.links.menu.yml +++ b/web/modules/custom/dpl_library_agency/dpl_library_agency.links.menu.yml @@ -1,18 +1,18 @@ dpl_library_agency.settings: - title: "Library Agency" + title: 'Library Agency' route_name: dpl_library_agency.settings parent: system.admin_config weight: -1000 dpl_library_agency.general_settings_form: - title: "General Settings" - description: "Administer various settings for a library agency." + title: 'General Settings' + description: 'Administer various settings for a library agency.' route_name: dpl_library_agency.general_settings parent: dpl_library_agency.settings weight: -999 dpl_library_agency.list_size_settings_form: - title: "List Size Settings" - description: "Administer list size settings for a library agency." + title: 'List Size Settings' + description: 'Administer list size settings for a library agency.' route_name: dpl_library_agency.list_size_settings parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_library_agency/dpl_library_agency.permissions.yml b/web/modules/custom/dpl_library_agency/dpl_library_agency.permissions.yml index 5def6dbc7..ab9ff2922 100644 --- a/web/modules/custom/dpl_library_agency/dpl_library_agency.permissions.yml +++ b/web/modules/custom/dpl_library_agency/dpl_library_agency.permissions.yml @@ -1,3 +1,3 @@ administer library agency configuration: - title: "Administer library agency configuration" - description: "Access for administering of the library agency configuration." + title: 'Administer library agency configuration' + description: 'Access for administering of the library agency configuration.' diff --git a/web/modules/custom/dpl_library_agency/dpl_library_agency.routing.yml b/web/modules/custom/dpl_library_agency/dpl_library_agency.routing.yml index 70523157e..1039913b1 100644 --- a/web/modules/custom/dpl_library_agency/dpl_library_agency.routing.yml +++ b/web/modules/custom/dpl_library_agency/dpl_library_agency.routing.yml @@ -1,27 +1,27 @@ dpl_library_agency.settings: - path: "/admin/config/dpl-library-agency" + path: '/admin/config/dpl-library-agency' defaults: _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage' - _title: "Library Agency" + _title: 'Library Agency' requirements: - _permission: "administer library agency configuration" + _permission: 'administer library agency configuration' dpl_library_agency.general_settings: - path: "/admin/config/dpl-library-agency/general-settings" + path: '/admin/config/dpl-library-agency/general-settings' defaults: _form: '\Drupal\dpl_library_agency\Form\GeneralSettingsForm' - _title: "General Settings" + _title: 'General Settings' requirements: - _permission: "administer library agency configuration" + _permission: 'administer library agency configuration' options: _admin_route: TRUE dpl_library_agency.list_size_settings: - path: "/admin/config/dpl-library-agency/list-size-settings" + path: '/admin/config/dpl-library-agency/list-size-settings' defaults: _form: '\Drupal\dpl_library_agency\Form\ListSizeSettingsForm' - _title: "List Size Settings" + _title: 'List Size Settings' requirements: - _permission: "administer library agency configuration" + _permission: 'administer library agency configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_library_agency/dpl_library_agency.services.yml b/web/modules/custom/dpl_library_agency/dpl_library_agency.services.yml index 590ffa28d..8408a19b2 100644 --- a/web/modules/custom/dpl_library_agency/dpl_library_agency.services.yml +++ b/web/modules/custom/dpl_library_agency/dpl_library_agency.services.yml @@ -1,26 +1,26 @@ services: dpl_library_agency.reservation_settings: class: Drupal\dpl_library_agency\ReservationSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] dpl_library_agency.branch_settings: class: Drupal\dpl_library_agency\BranchSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] dpl_library_agency.general_settings: class: Drupal\dpl_library_agency\GeneralSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] dpl_library_agency.list_size_settings: class: Drupal\dpl_library_agency\ListSizeSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] dpl_library_agency.branch.repository: class: Drupal\dpl_library_agency\Branch\FallbackBranchRepository arguments: - - "@dpl_library_agency.branch.repository.cache" - - "@dpl_library_agency.branch.repository.empty" - - "@dpl_library_agency.logger" + - '@dpl_library_agency.branch.repository.cache' + - '@dpl_library_agency.branch.repository.empty' + - '@dpl_library_agency.logger' dpl_library_agency.branch.repository.empty: class: Drupal\dpl_library_agency\Branch\EmptyBranchRepository @@ -28,9 +28,9 @@ services: dpl_library_agency.branch.repository.cache: class: Drupal\dpl_library_agency\Branch\CacheableBranchRepository arguments: - - "@dpl_library_agency.branch.repository.fbs" - - "@cache.default" - - "@datetime.time" + - '@dpl_library_agency.branch.repository.fbs' + - '@cache.default' + - '@datetime.time' # A lifetime of 12 hours should ensure that fresh data arrives at latest # one workday after being made available in FBS. - 43200 @@ -38,9 +38,9 @@ services: dpl_library_agency.branch.repository.fbs: class: Drupal\dpl_library_agency\Branch\FbsBranchRepository arguments: - - "@dpl_fbs.api_factory" - - "@dpl_library_token.handler" + - '@dpl_fbs.api_factory' + - '@dpl_library_token.handler' dpl_library_agency.logger: parent: logger.channel_base - arguments: ["DPL Library Agency"] + arguments: ['DPL Library Agency'] diff --git a/web/modules/custom/dpl_library_token/dpl_library_token.services.yml b/web/modules/custom/dpl_library_token/dpl_library_token.services.yml index 1130fd876..629a6a5e2 100644 --- a/web/modules/custom/dpl_library_token/dpl_library_token.services.yml +++ b/web/modules/custom/dpl_library_token/dpl_library_token.services.yml @@ -3,8 +3,8 @@ services: class: Drupal\dpl_library_token\LibraryTokenHandler arguments: [ - "@dpl_login.adgangsplatformen.config", - "@keyvalue.expirable", - "@http_client", - "@logger.factory", + '@dpl_login.adgangsplatformen.config', + '@keyvalue.expirable', + '@http_client', + '@logger.factory', ] diff --git a/web/modules/custom/dpl_link/dpl_link.info.yml b/web/modules/custom/dpl_link/dpl_link.info.yml index 0007a2c27..5b8f411aa 100644 --- a/web/modules/custom/dpl_link/dpl_link.info.yml +++ b/web/modules/custom/dpl_link/dpl_link.info.yml @@ -1,6 +1,6 @@ -name: "DPL Link" +name: 'DPL Link' type: module -description: "Add functionality to link field" +description: 'Add functionality to link field' package: DPL core_version_requirement: ^10 || ^11 dependencies: diff --git a/web/modules/custom/dpl_loans/dpl_loans.links.menu.yml b/web/modules/custom/dpl_loans/dpl_loans.links.menu.yml index d5b594dcd..6fb8e9c66 100644 --- a/web/modules/custom/dpl_loans/dpl_loans.links.menu.yml +++ b/web/modules/custom/dpl_loans/dpl_loans.links.menu.yml @@ -1,5 +1,5 @@ dpl_loan.list: - title: "Loans" + title: 'Loans' menu_name: user-profile-menu route_name: dpl_loans.list - description: "List user loans" + description: 'List user loans' diff --git a/web/modules/custom/dpl_loans/dpl_loans.routing.yml b/web/modules/custom/dpl_loans/dpl_loans.routing.yml index 61710e3d2..be5e4f3d0 100644 --- a/web/modules/custom/dpl_loans/dpl_loans.routing.yml +++ b/web/modules/custom/dpl_loans/dpl_loans.routing.yml @@ -1,6 +1,6 @@ dpl_loans.list: - path: "/user/me/loans" + path: '/user/me/loans' defaults: _controller: '\Drupal\dpl_loans\Controller\DplLoansController::list' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_loans/dpl_loans.services.yml b/web/modules/custom/dpl_loans/dpl_loans.services.yml index 34903bfd9..4169564e9 100644 --- a/web/modules/custom/dpl_loans/dpl_loans.services.yml +++ b/web/modules/custom/dpl_loans/dpl_loans.services.yml @@ -1,4 +1,4 @@ services: dpl_loans.settings: class: Drupal\dpl_loans\DplLoansSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_login/dpl_login.routing.yml b/web/modules/custom/dpl_login/dpl_login.routing.yml index 3d5fe384a..83fd5b090 100644 --- a/web/modules/custom/dpl_login/dpl_login.routing.yml +++ b/web/modules/custom/dpl_login/dpl_login.routing.yml @@ -1,19 +1,19 @@ dpl_login.logout: - path: "/logout" + path: '/logout' defaults: _controller: '\Drupal\dpl_login\Controller\DplLoginController::logout' - _title: "Dpl Login Logout Route" + _title: 'Dpl Login Logout Route' requirements: - _user_is_logged_in: "TRUE" + _user_is_logged_in: 'TRUE' options: no_cache: TRUE dpl_login.login: - path: "/login" + path: '/login' defaults: _controller: '\Drupal\dpl_login\Controller\DplLoginController::login' - _title: "Login via Adgangsplatformen" + _title: 'Login via Adgangsplatformen' requirements: - _permission: "access content" + _permission: 'access content' options: no_cache: TRUE diff --git a/web/modules/custom/dpl_login/dpl_login.services.yml b/web/modules/custom/dpl_login/dpl_login.services.yml index b43ff3127..c23d37a46 100644 --- a/web/modules/custom/dpl_login/dpl_login.services.yml +++ b/web/modules/custom/dpl_login/dpl_login.services.yml @@ -9,43 +9,43 @@ services: - { name: event_subscriber } dpl_login.registered_user_tokens: class: Drupal\dpl_login\RegisteredUserTokensProvider - arguments: ["@tempstore.private"] + arguments: ['@tempstore.private'] dpl_login.unregistered_user_tokens: class: Drupal\dpl_login\UnregisteredUserTokensProvider - arguments: ["@tempstore.private"] + arguments: ['@tempstore.private'] dpl_login.user_tokens: class: Drupal\dpl_login\UserTokens arguments: - - "@dpl_login.registered_user_tokens" - - "@dpl_login.unregistered_user_tokens" + - '@dpl_login.registered_user_tokens' + - '@dpl_login.unregistered_user_tokens' dpl_login.authentication.user_token: class: Drupal\dpl_login\UserTokenAuthProvider arguments: - - "@dpl_login.adgangsplatformen.client" - - "@module_handler" - - "@openid_connect.authmap" + - '@dpl_login.adgangsplatformen.client' + - '@module_handler' + - '@openid_connect.authmap' tags: - { name: authentication_provider, - provider_id: "dpl_login_user_token", + provider_id: 'dpl_login_user_token', priority: 0, } dpl_login.library_agency_id_provider: class: Drupal\dpl_login\LibraryAgencyIdProvider - arguments: ["@dpl_login.adgangsplatformen.config"] + arguments: ['@dpl_login.adgangsplatformen.config'] dpl_login.adgangsplatformen.client: class: Drupal\dpl_login\Plugin\OpenIDConnectClient\Adgangsplatformen - factory: ["@dpl_login.adgangsplatformen.factory", "createInstance"] + factory: ['@dpl_login.adgangsplatformen.factory', 'createInstance'] dpl_login.adgangsplatformen.factory: class: Drupal\dpl_login\Adgangsplatformen\Factory arguments: [ - "@plugin.manager.openid_connect_client", - "@dpl_login.adgangsplatformen.config", + '@plugin.manager.openid_connect_client', + '@dpl_login.adgangsplatformen.config', ] dpl_login.adgangsplatformen.config: class: Drupal\dpl_login\Adgangsplatformen\Config - arguments: ["@config.manager"] + arguments: ['@config.manager'] dpl_login.openid_user_info: class: Drupal\dpl_login\OpenIdUserInfoService - arguments: ["@settings"] + arguments: ['@settings'] diff --git a/web/modules/custom/dpl_mail/dpl_mail.info.yml b/web/modules/custom/dpl_mail/dpl_mail.info.yml index e5a0c6a12..932c871d5 100644 --- a/web/modules/custom/dpl_mail/dpl_mail.info.yml +++ b/web/modules/custom/dpl_mail/dpl_mail.info.yml @@ -1,5 +1,5 @@ -name: "DPL Mail" -description: "Handles mail related features and configuration" +name: 'DPL Mail' +description: 'Handles mail related features and configuration' package: DPL type: module diff --git a/web/modules/custom/dpl_mapp/dpl_mapp.permissions.yml b/web/modules/custom/dpl_mapp/dpl_mapp.permissions.yml index 60c79b4e9..d24601df4 100644 --- a/web/modules/custom/dpl_mapp/dpl_mapp.permissions.yml +++ b/web/modules/custom/dpl_mapp/dpl_mapp.permissions.yml @@ -1,3 +1,3 @@ administer dpl_mapp configuration: - title: "Administer dpl_mapp configuration" + title: 'Administer dpl_mapp configuration' restrict access: true diff --git a/web/modules/custom/dpl_mapp/dpl_mapp.routing.yml b/web/modules/custom/dpl_mapp/dpl_mapp.routing.yml index 032edf4b5..59980e735 100644 --- a/web/modules/custom/dpl_mapp/dpl_mapp.routing.yml +++ b/web/modules/custom/dpl_mapp/dpl_mapp.routing.yml @@ -1,7 +1,7 @@ dpl_mapp.settings_form: - path: "/admin/config/system/dpl-mapp" + path: '/admin/config/system/dpl-mapp' defaults: - _title: "Mapp Intelligence settings" + _title: 'Mapp Intelligence settings' _form: 'Drupal\dpl_mapp\Form\SettingsForm' requirements: - _permission: "administer dpl_mapp configuration" + _permission: 'administer dpl_mapp configuration' diff --git a/web/modules/custom/dpl_mapp/js/dpl_mapp.js b/web/modules/custom/dpl_mapp/js/dpl_mapp.js index 1d8835679..88e00f78f 100644 --- a/web/modules/custom/dpl_mapp/js/dpl_mapp.js +++ b/web/modules/custom/dpl_mapp/js/dpl_mapp.js @@ -6,35 +6,35 @@ (function dplMapp(once, wts) { const pushEvent = function pushEvent(eventId, eventData) { - console.debug("DPL Mapp: Pushing %s event %o", eventId, eventData); + console.debug('DPL Mapp: Pushing %s event %o', eventId, eventData); // Ensure that the Mapp object is defined before pushing event. - if (typeof wts !== "undefined") { - wts.push(["send", eventId, eventData]); + if (typeof wts !== 'undefined') { + wts.push(['send', eventId, eventData]); } }; Drupal.behaviors.dpl_mapp = { attach(context) { // Send Mapp events attached through the HTML. - once("js-dpl-mapp", ".js-dpl-mapp", context).forEach( + once('js-dpl-mapp', '.js-dpl-mapp', context).forEach( function elementHandler(el) { - el.addEventListener("click", function clickHandler() { - const eventId = this.dataset.dplMappEventId || "click"; + el.addEventListener('click', function clickHandler() { + const eventId = this.dataset.dplMappEventId || 'click'; const eventDataString = this.dataset.dplMappEventData; let eventData = {}; try { eventData = JSON.parse(eventDataString); } catch (e) { console.debug( - "DPL Mapp: Event data not recognized as JSON: %s", - eventDataString + 'DPL Mapp: Event data not recognized as JSON: %s', + eventDataString, ); } pushEvent(eventId, eventData); }); - } + }, ); }, }; diff --git a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.info.yml b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.info.yml index 2e9d345ee..817a9d3db 100644 --- a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.info.yml +++ b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.info.yml @@ -1,6 +1,6 @@ -name: "DPL Opening Hours" +name: 'DPL Opening Hours' type: module -description: "Handling of opening hours for branches." +description: 'Handling of opening hours for branches.' package: DPL core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.links.task.yml b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.links.task.yml index 1205124b9..76305e61d 100644 --- a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.links.task.yml +++ b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.links.task.yml @@ -1,5 +1,5 @@ dpl_opening_hours.editor.task: route_name: dpl_opening_hours.editor - title: "Opening Hours" + title: 'Opening Hours' base_route: entity.node.canonical weight: 1000 diff --git a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.permissions.yml b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.permissions.yml index 40071721a..d56486cff 100644 --- a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.permissions.yml +++ b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.permissions.yml @@ -1,4 +1,4 @@ manage opening hours for branches: - title: "Manage opening hours for branches." - description: "Create, update and delete opening hours instances for all branches." + title: 'Manage opening hours for branches.' + description: 'Create, update and delete opening hours instances for all branches.' restrict access: FALSE diff --git a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.routing.yml b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.routing.yml index 48f91e1bc..27ca65892 100644 --- a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.routing.yml +++ b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.routing.yml @@ -1,10 +1,10 @@ dpl_opening_hours.editor: - path: "/node/{node}/edit/opening-hours" + path: '/node/{node}/edit/opening-hours' defaults: _controller: '\Drupal\dpl_opening_hours\Controller\OpeningHoursEditorController::content' - _title: "Opening Hours" + _title: 'Opening Hours' requirements: - _permission: "manage opening hours for branches" + _permission: 'manage opening hours for branches' _custom_access: '\Drupal\dpl_opening_hours\Controller\OpeningHoursEditorController::access' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.services.yml b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.services.yml index 472d61334..0a4980918 100644 --- a/web/modules/custom/dpl_opening_hours/dpl_opening_hours.services.yml +++ b/web/modules/custom/dpl_opening_hours/dpl_opening_hours.services.yml @@ -1,35 +1,35 @@ services: dpl_opening_hours.logger: parent: logger.channel_base - arguments: ["dpl_opening_hours"] + arguments: ['dpl_opening_hours'] dpl_opening_hours.branch_storage: class: \Drupal\Core\Entity\EntityStorageInterface - factory: ["@entity_type.manager", "getStorage"] - arguments: ["node"] + factory: ['@entity_type.manager', 'getStorage'] + arguments: ['node'] dpl_opening_hours.category_storage: class: \Drupal\Core\Entity\EntityStorageInterface - factory: ["@entity_type.manager", "getStorage"] - arguments: ["taxonomy_term"] + factory: ['@entity_type.manager', 'getStorage'] + arguments: ['taxonomy_term'] dpl_opening_hours.repository: class: Drupal\dpl_opening_hours\Model\OpeningHoursRepository arguments: - - "@dpl_opening_hours.logger" - - "@database" - - "@dpl_opening_hours.branch_storage" - - "@dpl_opening_hours.category_storage" - - "@dpl_opening_hours.repetition_repository" + - '@dpl_opening_hours.logger' + - '@database' + - '@dpl_opening_hours.branch_storage' + - '@dpl_opening_hours.category_storage' + - '@dpl_opening_hours.repetition_repository' dpl_opening_hours.repetition_repository: class: Drupal\dpl_opening_hours\Model\Repetition\RepetitionRepository arguments: - - "@database" + - '@database' dpl_opening_hours.repetition_mapper: class: Drupal\dpl_opening_hours\Mapping\RepetitionMapper dpl_opening_hours.mapper: class: Drupal\dpl_opening_hours\Mapping\OpeningHoursMapper arguments: - - "@dpl_opening_hours.branch_storage" - - "@dpl_opening_hours.category_storage" - - "@dpl_opening_hours.repetition_mapper" + - '@dpl_opening_hours.branch_storage' + - '@dpl_opening_hours.category_storage' + - '@dpl_opening_hours.repetition_mapper' dpl_opening_hours.route_subscriber: class: Drupal\dpl_opening_hours\EventSubscriber\ApiRouteSubscriber tags: diff --git a/web/modules/custom/dpl_paragraphs/dpl_paragraphs.info.yml b/web/modules/custom/dpl_paragraphs/dpl_paragraphs.info.yml index 52fc2b63c..33d05de74 100644 --- a/web/modules/custom/dpl_paragraphs/dpl_paragraphs.info.yml +++ b/web/modules/custom/dpl_paragraphs/dpl_paragraphs.info.yml @@ -1,5 +1,5 @@ -name: "DPL Paragraphs" +name: 'DPL Paragraphs' type: module -description: "Tweaks to various DPL paragraphs" -package: "DPL" +description: 'Tweaks to various DPL paragraphs' +package: 'DPL' core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_patron_menu/dpl_patron_menu.services.yml b/web/modules/custom/dpl_patron_menu/dpl_patron_menu.services.yml index be8bc14bd..7cca3f6b3 100644 --- a/web/modules/custom/dpl_patron_menu/dpl_patron_menu.services.yml +++ b/web/modules/custom/dpl_patron_menu/dpl_patron_menu.services.yml @@ -1,4 +1,4 @@ services: dpl_patron_menu.settings: class: Drupal\dpl_patron_menu\DplMenuSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_patron_page/dpl_patron_page.links.menu.yml b/web/modules/custom/dpl_patron_page/dpl_patron_page.links.menu.yml index 701cba09e..304fa9c47 100644 --- a/web/modules/custom/dpl_patron_page/dpl_patron_page.links.menu.yml +++ b/web/modules/custom/dpl_patron_page/dpl_patron_page.links.menu.yml @@ -1,11 +1,11 @@ patron_page.profile: - title: "Patron page" + title: 'Patron page' menu_name: user-profile-menu route_name: dpl_patron_page.profile - description: "Patron page displays patron information" + description: 'Patron page displays patron information' patron_page.settings_form: - title: "Patron page settings" + title: 'Patron page settings' route_name: dpl_patron_page.settings - description: "Change patron page settings" + description: 'Change patron page settings' parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_patron_page/dpl_patron_page.routing.yml b/web/modules/custom/dpl_patron_page/dpl_patron_page.routing.yml index 6f01e29fb..b5a1b2f76 100644 --- a/web/modules/custom/dpl_patron_page/dpl_patron_page.routing.yml +++ b/web/modules/custom/dpl_patron_page/dpl_patron_page.routing.yml @@ -1,16 +1,16 @@ dpl_patron_page.profile: - path: "/user/me" + path: '/user/me' defaults: _controller: '\Drupal\dpl_patron_page\Controller\DplPatronPageController::profile' requirements: - _permission: "access content" + _permission: 'access content' dpl_patron_page.settings: - path: "/admin/config/dpl-library-agency/patron-page-settings" + path: '/admin/config/dpl-library-agency/patron-page-settings' defaults: _form: '\Drupal\dpl_patron_page\Form\PatronPageSettingsForm' - _title: "Patron page settings" + _title: 'Patron page settings' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_patron_page/dpl_patron_page.services.yml b/web/modules/custom/dpl_patron_page/dpl_patron_page.services.yml index 31361545a..fb9b68e0f 100644 --- a/web/modules/custom/dpl_patron_page/dpl_patron_page.services.yml +++ b/web/modules/custom/dpl_patron_page/dpl_patron_page.services.yml @@ -1,4 +1,4 @@ services: dpl_patron_page.settings: class: Drupal\dpl_patron_page\DplPatronPageSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.links.menu.yml b/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.links.menu.yml index e756e683c..fd51b000d 100644 --- a/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.links.menu.yml +++ b/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.links.menu.yml @@ -1,5 +1,5 @@ dpl_patron_redirect.settings_form: - title: "Patron redirect settings" + title: 'Patron redirect settings' route_name: dpl_patron_redirect.settings - description: "Set auth redirect paths for patrons" + description: 'Set auth redirect paths for patrons' parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.routing.yml b/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.routing.yml index 985de9a8b..46fc5f804 100644 --- a/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.routing.yml +++ b/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.routing.yml @@ -1,9 +1,9 @@ dpl_patron_redirect.settings: - path: "/admin/config/redirect" + path: '/admin/config/redirect' defaults: _form: '\Drupal\dpl_patron_redirect\Form\PatronRedirectSettingsForm' - _title: "Patron redirect settings" + _title: 'Patron redirect settings' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.services.yml b/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.services.yml index 525aaf94d..f51fec56e 100644 --- a/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.services.yml +++ b/web/modules/custom/dpl_patron_redirect/dpl_patron_redirect.services.yml @@ -3,12 +3,12 @@ services: class: Drupal\dpl_patron_redirect\EventSubscriber\RedirectPatronSubscriber arguments: [ - "@path_alias.manager", - "@path.matcher", - "@path.current", - "@config.factory", - "@current_user", - "@page_cache_kill_switch", + '@path_alias.manager', + '@path.matcher', + '@path.current', + '@config.factory', + '@current_user', + '@page_cache_kill_switch', ] tags: - { name: event_subscriber } diff --git a/web/modules/custom/dpl_patron_reg/dpl_patron_reg.links.menu.yml b/web/modules/custom/dpl_patron_reg/dpl_patron_reg.links.menu.yml index 66c365207..1bb57cd70 100644 --- a/web/modules/custom/dpl_patron_reg/dpl_patron_reg.links.menu.yml +++ b/web/modules/custom/dpl_patron_reg/dpl_patron_reg.links.menu.yml @@ -1,5 +1,5 @@ dpl_patron_reg.settings_form: - title: "Patron registration" + title: 'Patron registration' route_name: dpl_patron_reg.settings - description: "Change patron registration settings" + description: 'Change patron registration settings' parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_patron_reg/dpl_patron_reg.routing.yml b/web/modules/custom/dpl_patron_reg/dpl_patron_reg.routing.yml index 76da1f4b6..e56baba6f 100644 --- a/web/modules/custom/dpl_patron_reg/dpl_patron_reg.routing.yml +++ b/web/modules/custom/dpl_patron_reg/dpl_patron_reg.routing.yml @@ -1,28 +1,28 @@ dpl_patron_reg.settings: - path: "/admin/config/people/registration" + path: '/admin/config/people/registration' defaults: _form: '\Drupal\dpl_patron_reg\Form\PatronRegSettingsForm' - _title: "Patron registration" + _title: 'Patron registration' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: true dpl_patron_reg.auth: - path: "/user/registration/{client_name}/auth" + path: '/user/registration/{client_name}/auth' defaults: _controller: '\Drupal\dpl_patron_reg\Controller\DplPatronRegController::authRedirect' - _title: "Patron nem-login authentication" + _title: 'Patron nem-login authentication' requirements: - _permission: "access content" + _permission: 'access content' options: no_cache: true dpl_patron_reg.create: - path: "/user/registration/create" + path: '/user/registration/create' defaults: _controller: '\Drupal\dpl_patron_reg\Controller\DplPatronRegController::userRegistrationReactAppLoad' requirements: - _permission: "access content" + _permission: 'access content' options: no_cache: true diff --git a/web/modules/custom/dpl_patron_reg/dpl_patron_reg.services.yml b/web/modules/custom/dpl_patron_reg/dpl_patron_reg.services.yml index 55306e0f2..ee32e99c0 100644 --- a/web/modules/custom/dpl_patron_reg/dpl_patron_reg.services.yml +++ b/web/modules/custom/dpl_patron_reg/dpl_patron_reg.services.yml @@ -1,4 +1,4 @@ services: dpl_patron_reg.settings: class: Drupal\dpl_patron_reg\DplPatronRegSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_po/dpl_po.services.yml b/web/modules/custom/dpl_po/dpl_po.services.yml index 0c40b4534..7f0a83e74 100644 --- a/web/modules/custom/dpl_po/dpl_po.services.yml +++ b/web/modules/custom/dpl_po/dpl_po.services.yml @@ -2,10 +2,10 @@ services: dpl_po.config_manager: class: Drupal\dpl_po\Services\CtpConfigManager arguments: - - "@config.storage" - - "@locale.storage" - - "@config.factory" - - "@config.typed" - - "@language_manager" - - "@locale.default.config.storage" - - "@config.manager" + - '@config.storage' + - '@locale.storage' + - '@config.factory' + - '@config.typed' + - '@language_manager' + - '@locale.default.config.storage' + - '@config.manager' diff --git a/web/modules/custom/dpl_po/drush.services.yml b/web/modules/custom/dpl_po/drush.services.yml index 6e9e181e9..b7fa5b280 100644 --- a/web/modules/custom/dpl_po/drush.services.yml +++ b/web/modules/custom/dpl_po/drush.services.yml @@ -2,10 +2,10 @@ services: dpl_po.commands: class: \Drupal\dpl_po\Commands\DplPoCommands arguments: - - "@config.factory" - - "@dpl_po.config_manager" - - "@file_system" - - "@module_handler" - - "@http_client" + - '@config.factory' + - '@dpl_po.config_manager' + - '@file_system' + - '@module_handler' + - '@http_client' tags: - { name: drush.command } diff --git a/web/modules/custom/dpl_protected_nodes/dpl_protected_nodes.info.yml b/web/modules/custom/dpl_protected_nodes/dpl_protected_nodes.info.yml index 4ed847b7b..450e2151a 100644 --- a/web/modules/custom/dpl_protected_nodes/dpl_protected_nodes.info.yml +++ b/web/modules/custom/dpl_protected_nodes/dpl_protected_nodes.info.yml @@ -1,5 +1,5 @@ -name: "DPL Protected Nodes" +name: 'DPL Protected Nodes' type: module -description: "This modules handles protected nodes by checking if a node is being used as a reference in configuration." +description: 'This modules handles protected nodes by checking if a node is being used as a reference in configuration.' package: DPL core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_publication/dpl_publication.info.yml b/web/modules/custom/dpl_publication/dpl_publication.info.yml index b07116130..9ceae94e4 100644 --- a/web/modules/custom/dpl_publication/dpl_publication.info.yml +++ b/web/modules/custom/dpl_publication/dpl_publication.info.yml @@ -1,5 +1,5 @@ -name: "DPL publication" +name: 'DPL publication' type: module -description: "Sets the publication date field when content is published.'" +description: 'Sets the publication date field when content is published.'' package: Custom core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_publizon/dpl_publizon.links.menu.yml b/web/modules/custom/dpl_publizon/dpl_publizon.links.menu.yml index 37620aab8..13f1cceda 100644 --- a/web/modules/custom/dpl_publizon/dpl_publizon.links.menu.yml +++ b/web/modules/custom/dpl_publizon/dpl_publizon.links.menu.yml @@ -1,5 +1,5 @@ dpl_publizon.settings_form: - title: "Publizon settings" + title: 'Publizon settings' route_name: dpl_publizon.settings - description: "Change basic publizon settings" + description: 'Change basic publizon settings' parent: system.admin_config_services diff --git a/web/modules/custom/dpl_publizon/dpl_publizon.routing.yml b/web/modules/custom/dpl_publizon/dpl_publizon.routing.yml index e427fb1a4..3a11689c8 100644 --- a/web/modules/custom/dpl_publizon/dpl_publizon.routing.yml +++ b/web/modules/custom/dpl_publizon/dpl_publizon.routing.yml @@ -1,9 +1,9 @@ dpl_publizon.settings: - path: "/admin/config/services/publizon" + path: '/admin/config/services/publizon' defaults: _form: '\Drupal\dpl_publizon\Form\PublizonSettingsForm' - _title: "Publizon settings" + _title: 'Publizon settings' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_publizon/dpl_publizon.services.yml b/web/modules/custom/dpl_publizon/dpl_publizon.services.yml index 1b2bdef1c..42f8d3979 100644 --- a/web/modules/custom/dpl_publizon/dpl_publizon.services.yml +++ b/web/modules/custom/dpl_publizon/dpl_publizon.services.yml @@ -1,4 +1,4 @@ services: dpl_publizon.settings: class: Drupal\dpl_publizon\DplPublizonSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_react/dpl_react.routing.yml b/web/modules/custom/dpl_react/dpl_react.routing.yml index 217624f8f..6ac1e41c1 100644 --- a/web/modules/custom/dpl_react/dpl_react.routing.yml +++ b/web/modules/custom/dpl_react/dpl_react.routing.yml @@ -1,9 +1,9 @@ dpl_react.user_token: - path: "/dpl-react/user-tokens" + path: '/dpl-react/user-tokens' defaults: _controller: '\Drupal\dpl_react\Controller\DplReactController::user' - _title: "DPL React User Token" + _title: 'DPL React User Token' requirements: - _permission: "access content" + _permission: 'access content' options: - no_cache: "TRUE" + no_cache: 'TRUE' diff --git a/web/modules/custom/dpl_react/js/handler.js b/web/modules/custom/dpl_react/js/handler.js index dabae852a..48ca48fe4 100644 --- a/web/modules/custom/dpl_react/js/handler.js +++ b/web/modules/custom/dpl_react/js/handler.js @@ -4,11 +4,11 @@ // element with querySelectorAll, so this tries to do the right // thing. const getElement = function getElement(element) { - if (typeof element.querySelectorAll !== "function") { + if (typeof element.querySelectorAll !== 'function') { element = element[0] || element; } - if (typeof element.querySelectorAll !== "function") { + if (typeof element.querySelectorAll !== 'function') { return null; } @@ -19,7 +19,7 @@ // https://github.com/jquery/jquery/blob/3.6.0/src/core/DOMEval.js const DOMEval = function DOMEval(code) { const doc = document; - const script = doc.createElement("script"); + const script = doc.createElement('script'); script.text = code; doc.head.appendChild(script).parentNode.removeChild(script); }; @@ -29,17 +29,17 @@ const element = getElement(context); if (element) { // Port jQuery.ajax with dataType script to vanilla JS with Fetch API. - fetch("/dpl-react/user-tokens", { + fetch('/dpl-react/user-tokens', { headers: { Accept: - "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript", + 'text/javascript, application/javascript, ' + + 'application/ecmascript, application/x-ecmascript', }, }) .then((response) => { if (!response.ok) { throw new Error( - `HTTP error response: ${response.status} - ${response.statusText}` + `HTTP error response: ${response.status} - ${response.statusText}`, ); } return response.text(); diff --git a/web/modules/custom/dpl_react_apps/dpl_react_apps.routing.yml b/web/modules/custom/dpl_react_apps/dpl_react_apps.routing.yml index 93de0aa65..4d630fbcc 100644 --- a/web/modules/custom/dpl_react_apps/dpl_react_apps.routing.yml +++ b/web/modules/custom/dpl_react_apps/dpl_react_apps.routing.yml @@ -1,20 +1,20 @@ dpl_react_apps.search_result: - path: "/search" + path: '/search' defaults: _controller: '\Drupal\dpl_react_apps\Controller\DplReactAppsController::search' requirements: - _permission: "access content" + _permission: 'access content' dpl_react_apps.advanced_search: - path: "/advanced-search" + path: '/advanced-search' defaults: _controller: '\Drupal\dpl_react_apps\Controller\DplReactAppsController::advancedSearch' requirements: - _permission: "access content" + _permission: 'access content' dpl_react_apps.work: - path: "/work/{wid}" + path: '/work/{wid}' defaults: _controller: '\Drupal\dpl_react_apps\Controller\DplReactAppsController::work' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_recommender/dpl_recommender.routing.yml b/web/modules/custom/dpl_recommender/dpl_recommender.routing.yml index e1dea8424..015d2a959 100644 --- a/web/modules/custom/dpl_recommender/dpl_recommender.routing.yml +++ b/web/modules/custom/dpl_recommender/dpl_recommender.routing.yml @@ -1,16 +1,16 @@ dpl_recommender.list: - path: "/recommender" + path: '/recommender' defaults: _controller: '\Drupal\dpl_recommender\Controller\DplRecommenderController::list' requirements: - _permission: "access content" + _permission: 'access content' dpl_recommender.settings: - path: "/admin/config/dpl-library-agency/recommender-settings" + path: '/admin/config/dpl-library-agency/recommender-settings' defaults: _form: '\Drupal\dpl_recommender\Form\RecommenderSettingsForm' - _title: "Recommender settings" + _title: 'Recommender settings' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_recommender/dpl_recommender.services.yml b/web/modules/custom/dpl_recommender/dpl_recommender.services.yml index 3c562a04e..32f3ceddd 100644 --- a/web/modules/custom/dpl_recommender/dpl_recommender.services.yml +++ b/web/modules/custom/dpl_recommender/dpl_recommender.services.yml @@ -1,4 +1,4 @@ services: dpl_recommender.settings: class: Drupal\dpl_recommender\DplRecommenderSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.info.yml b/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.info.yml index 18cc38836..dd07827db 100644 --- a/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.info.yml +++ b/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.info.yml @@ -1,6 +1,6 @@ -name: "DPL Redia Legacy feeds" +name: 'DPL Redia Legacy feeds' type: module -description: "Various legacy integrations, used for the Redia App." +description: 'Various legacy integrations, used for the Redia App.' package: DPL core_version_requirement: ^10 diff --git a/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.routing.yml b/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.routing.yml index efb867c3d..14909ab3f 100644 --- a/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.routing.yml +++ b/web/modules/custom/dpl_redia_legacy/dpl_redia_legacy.routing.yml @@ -1,9 +1,9 @@ dpl_redia_legacy.events: - path: "/ding-redia-rss/event" + path: '/ding-redia-rss/event' defaults: _controller: '\Drupal\dpl_redia_legacy\Controller\RssFeeds\EventsController::getFeed' - _title: "Redia APP Event" + _title: 'Redia APP Event' requirements: - _permission: "access content" + _permission: 'access content' options: - _format: "xml" + _format: 'xml' diff --git a/web/modules/custom/dpl_related_content/dpl_related_content.services.yml b/web/modules/custom/dpl_related_content/dpl_related_content.services.yml index bad6a8725..b5376fc33 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content.services.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content.services.yml @@ -1,5 +1,5 @@ services: dpl_related_content.related_content: class: Drupal\dpl_related_content\Services\RelatedContent - arguments: ["@entity_type.manager", "@database", "@string_translation"] + arguments: ['@entity_type.manager', '@database', '@string_translation'] shared: false diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/2abdab73-6a04-4646-8e34-76cad335a9e7.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/2abdab73-6a04-4646-8e34-76cad335a9e7.yml index 78b71a7a6..b0de39197 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/2abdab73-6a04-4646-8e34-76cad335a9e7.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/2abdab73-6a04-4646-8e34-76cad335a9e7.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: eventseries uuid: 2abdab73-6a04-4646-8e34-76cad335a9e7 bundle: default @@ -43,57 +43,57 @@ default: uid: - target_id: 1 title: - - value: "Event 2 | tag1, tag2, cat1, branch1" + - value: 'Event 2 | tag1, tag2, cat1, branch1' recur_type: - value: weekly_recurring_date consecutive_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" - end_time: "11:30 pm" + - value: '' + end_value: '' + time: '08:00 am' + end_time: '11:30 pm' duration: 5 duration_units: minute buffer: 0 buffer_units: minute daily_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration weekly_recurring_date: - - value: "2027-06-04T16:08:16" - end_value: "2027-12-04T17:08:16" - time: "08:00 am" + - value: '2027-06-04T16:08:16' + end_value: '2027-12-04T17:08:16' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration days: friday monthly_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" + - value: '' + end_value: '' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' yearly_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' year_interval: 0 - months: "" + months: '' created: - value: 1717499182 revision_translation_affected: @@ -102,11 +102,11 @@ default: - tag: meta attributes: name: title - content: "| DPL CMS" + content: '| DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/user/login" + href: 'http://dapple-cms.docker/user/login' path: - alias: /testfilialen/events/cat1/event-2-tag1-tag2-cat1-branch1 langcode: und @@ -147,7 +147,7 @@ default: field_event_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 48b2695d-31dd-4a1d-b37d-1bed1a0a9443 bundle: text_body diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cbd3796e-c870-4e53-b47e-b43a4ec29a13.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cbd3796e-c870-4e53-b47e-b43a4ec29a13.yml index b81482f06..ea0491dd1 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cbd3796e-c870-4e53-b47e-b43a4ec29a13.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cbd3796e-c870-4e53-b47e-b43a4ec29a13.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: eventseries uuid: cbd3796e-c870-4e53-b47e-b43a4ec29a13 bundle: default @@ -31,53 +31,53 @@ default: recur_type: - value: weekly_recurring_date consecutive_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" - end_time: "11:30 pm" + - value: '' + end_value: '' + time: '08:00 am' + end_time: '11:30 pm' duration: 5 duration_units: minute buffer: 0 buffer_units: minute daily_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration weekly_recurring_date: - - value: "2027-05-17T16:08:26" - end_value: "2027-08-06T16:08:26" - time: "08:00 am" + - value: '2027-05-17T16:08:26' + end_value: '2027-08-06T16:08:26' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration days: monday monthly_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" + - value: '' + end_value: '' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' yearly_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' year_interval: 0 - months: "" + months: '' created: - value: 1717512986 revision_translation_affected: @@ -86,11 +86,11 @@ default: - tag: meta attributes: name: title - content: "| DPL CMS" + content: '| DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/user/login" + href: 'http://dapple-cms.docker/user/login' path: - alias: /testfilialen2/events/cat2/event-3-tag2-cat2-branch2 langcode: und @@ -116,7 +116,7 @@ default: field_event_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 03c12132-4913-4953-8703-9a43f39e56fa bundle: text_body diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cc6da236-c27d-43f7-83df-a5214f9c1026.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cc6da236-c27d-43f7-83df-a5214f9c1026.yml index 63f8cc75f..598cad47b 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cc6da236-c27d-43f7-83df-a5214f9c1026.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/cc6da236-c27d-43f7-83df-a5214f9c1026.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: eventseries uuid: cc6da236-c27d-43f7-83df-a5214f9c1026 bundle: default @@ -59,57 +59,57 @@ default: uid: - target_id: 1 title: - - value: "Event 1 | tag1, tag2, cat1, branch1" + - value: 'Event 1 | tag1, tag2, cat1, branch1' recur_type: - value: weekly_recurring_date consecutive_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" - end_time: "11:30 pm" + - value: '' + end_value: '' + time: '08:00 am' + end_time: '11:30 pm' duration: 5 duration_units: minute buffer: 0 buffer_units: minute daily_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration weekly_recurring_date: - - value: "2028-01-04T17:08:38" - end_value: "2028-06-04T16:08:38" - time: "08:00 am" + - value: '2028-01-04T17:08:38' + end_value: '2028-06-04T16:08:38' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration - days: "monday,tuesday" + days: 'monday,tuesday' monthly_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" + - value: '' + end_value: '' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' yearly_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' year_interval: 0 - months: "" + months: '' created: - value: 1717497934 revision_translation_affected: @@ -118,11 +118,11 @@ default: - tag: meta attributes: name: title - content: "| DPL CMS" + content: '| DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/user/login" + href: 'http://dapple-cms.docker/user/login' path: - alias: /testfilialen/events/cat1/event-1-tag1-tag2-cat1-branch1 langcode: und @@ -179,7 +179,7 @@ default: field_event_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: aab1a01d-2df5-4eb4-abd4-1c7790d974bd bundle: text_body diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/ffb75415-6568-49a9-9cdf-1e16cc6ca0d3.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/ffb75415-6568-49a9-9cdf-1e16cc6ca0d3.yml index 89e130d2e..b69156f46 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/ffb75415-6568-49a9-9cdf-1e16cc6ca0d3.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/eventseries/ffb75415-6568-49a9-9cdf-1e16cc6ca0d3.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: eventseries uuid: ffb75415-6568-49a9-9cdf-1e16cc6ca0d3 bundle: default @@ -19,56 +19,56 @@ default: recur_type: - value: custom consecutive_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" - end_time: "11:30 pm" + - value: '' + end_value: '' + time: '08:00 am' + end_time: '11:30 pm' duration: 5 duration_units: minute buffer: 0 buffer_units: minute daily_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration weekly_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" + - value: '' + end_value: '' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration - days: "" + days: '' monthly_recurring_date: - - value: "" - end_value: "" - time: "08:00 am" + - value: '' + end_value: '' + time: '08:00 am' duration: 900 - end_time: "08:00 am" + end_time: '08:00 am' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' yearly_recurring_date: - - value: "" - end_value: "" - time: "" + - value: '' + end_value: '' + time: '' duration: 0 - end_time: "" + end_time: '' duration_or_end_time: duration - days: "" - type: "" - day_occurrence: "" - day_of_month: "" + days: '' + type: '' + day_occurrence: '' + day_of_month: '' year_interval: 0 - months: "" + months: '' custom_date: - - value: "2027-09-27T08:00:00" - end_value: "2027-09-27T09:00:00" + - value: '2027-09-27T08:00:00' + end_value: '2027-09-27T09:00:00' created: - value: 1717513051 revision_translation_affected: @@ -77,11 +77,11 @@ default: - tag: meta attributes: name: title - content: "| DPL CMS" + content: '| DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/user/login" + href: 'http://dapple-cms.docker/user/login' path: - alias: /arrangementer/event-4-tag2-0 langcode: und @@ -93,7 +93,7 @@ default: field_event_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 5b3f7e3a-6f95-4cb8-bd6d-b1c12a89375c bundle: text_body diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/085fdde8-5319-43b2-8ed8-7d9d27886069.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/085fdde8-5319-43b2-8ed8-7d9d27886069.yml index ae49f88a4..5f299e20e 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/085fdde8-5319-43b2-8ed8-7d9d27886069.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/085fdde8-5319-43b2-8ed8-7d9d27886069.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 085fdde8-5319-43b2-8ed8-7d9d27886069 bundle: article @@ -18,7 +18,7 @@ default: uid: - target_id: 1 title: - - value: "Artikel 1 | tag1, tag2, cat1, branch1" + - value: 'Artikel 1 | tag1, tag2, cat1, branch1' created: - value: 1717497539 promote: @@ -31,15 +31,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Artikel 1 | tag1, tag2, cat1, branch1 | DPL CMS" + content: 'Artikel 1 | tag1, tag2, cat1, branch1 | DPL CMS' path: - alias: /branch1/articles/cat1/artikel-1-tag1-tag2-cat1-branch1 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1201ee52-766e-4793-8b9f-155fe6e74a5d.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1201ee52-766e-4793-8b9f-155fe6e74a5d.yml index 67526a391..49185c3e1 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1201ee52-766e-4793-8b9f-155fe6e74a5d.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1201ee52-766e-4793-8b9f-155fe6e74a5d.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 1201ee52-766e-4793-8b9f-155fe6e74a5d bundle: page @@ -14,7 +14,7 @@ default: uid: - target_id: 1 title: - - value: "Page1 | Branch1" + - value: 'Page1 | Branch1' created: - value: 1717517161 promote: @@ -29,7 +29,7 @@ default: - tag: meta attributes: name: title - content: "Page1 | Branch1 | DPL CMS" + content: 'Page1 | Branch1 | DPL CMS' path: - alias: /testfilialen/page1-branch1 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/13de1b72-4cae-4757-a92a-d81c96e6c6c2.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/13de1b72-4cae-4757-a92a-d81c96e6c6c2.yml index 91e8937bf..3be907bd0 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/13de1b72-4cae-4757-a92a-d81c96e6c6c2.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/13de1b72-4cae-4757-a92a-d81c96e6c6c2.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 13de1b72-4cae-4757-a92a-d81c96e6c6c2 bundle: article @@ -16,7 +16,7 @@ default: uid: - target_id: 1 title: - - value: "Artikel 4 | tag1, branch2" + - value: 'Artikel 4 | tag1, branch2' created: - value: 1717497635 promote: @@ -29,15 +29,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Artikel 4 | tag1, branch2 | DPL CMS" + content: 'Artikel 4 | tag1, branch2 | DPL CMS' path: - alias: /testfilialen2/articles/artikel-4-tag1-branch2 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1f4f09dd-83dd-4f82-a57d-95086966c7a3.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1f4f09dd-83dd-4f82-a57d-95086966c7a3.yml index e813600ae..a4b3c1aad 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1f4f09dd-83dd-4f82-a57d-95086966c7a3.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/1f4f09dd-83dd-4f82-a57d-95086966c7a3.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 1f4f09dd-83dd-4f82-a57d-95086966c7a3 bundle: article @@ -18,7 +18,7 @@ default: uid: - target_id: 1 title: - - value: "RelatedContent test" + - value: 'RelatedContent test' created: - value: 1717516357 promote: @@ -33,7 +33,7 @@ default: - tag: meta attributes: name: title - content: "RelatedContent test | DPL CMS" + content: 'RelatedContent test | DPL CMS' path: - alias: /branch1/articles/cat2/relatedcontent-test langcode: und @@ -45,7 +45,7 @@ default: field_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: b2cc4e4c-68a5-4a12-891c-63af28feea9b bundle: filtered_event_list @@ -64,12 +64,12 @@ default: field_filter_tags: - entity: ab73e9ee-9195-4245-bb95-f5de1c4eb06f field_max_item_amount: - - value: "12" + - value: '12' field_title: - - value: "Event list - automatic - tag1" + - value: 'Event list - automatic - tag1' - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 32250239-124c-4fdd-a693-003f57e23306 bundle: content_slider_automatic @@ -95,10 +95,10 @@ default: field_filter_tags: - entity: ab73e9ee-9195-4245-bb95-f5de1c4eb06f field_title: - - value: "Slider - Article + Events + Tag 1 + Cat 1 + Branch 1 (OR)" + - value: 'Slider - Article + Events + Tag 1 + Cat 1 + Branch 1 (OR)' - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: a74126ed-e24d-45f3-910f-dde2680bd916 bundle: content_slider_automatic @@ -122,10 +122,10 @@ default: field_filter_tags: - entity: ab73e9ee-9195-4245-bb95-f5de1c4eb06f field_title: - - value: "Slider - Events + Articles + Tag 1 + Cat 1 (AND)" + - value: 'Slider - Events + Articles + Tag 1 + Cat 1 (AND)' - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 171dc2e5-8716-4df2-bf0c-8c0d8e01f44f bundle: content_slider_automatic @@ -145,10 +145,10 @@ default: field_filter_cond_type: - value: or field_title: - - value: "Slider - Branch1+Cat1+Cat2 (OR)" + - value: 'Slider - Branch1+Cat1+Cat2 (OR)' - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 3bd1e337-e322-4f5c-9576-eae680eccc81 bundle: content_slider_automatic @@ -168,10 +168,10 @@ default: - entity: ab73e9ee-9195-4245-bb95-f5de1c4eb06f - entity: 5d70c9f7-779c-4337-a587-ced7a8ecc770 field_title: - - value: "Slider - Tag1+Tag2 (AND)" + - value: 'Slider - Tag1+Tag2 (AND)' - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 052840b7-538c-44c5-a5f3-b58ff37b4834 bundle: content_slider_automatic @@ -191,7 +191,7 @@ default: - value: event - value: page field_title: - - value: "Slider - Page+Events" + - value: 'Slider - Page+Events' field_show_override_author: - value: false field_tags: diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/2b38f99d-f500-42a8-9b21-9732d765ed44.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/2b38f99d-f500-42a8-9b21-9732d765ed44.yml index 96362ceb7..146d619a1 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/2b38f99d-f500-42a8-9b21-9732d765ed44.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/2b38f99d-f500-42a8-9b21-9732d765ed44.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 2b38f99d-f500-42a8-9b21-9732d765ed44 bundle: article @@ -18,7 +18,7 @@ default: uid: - target_id: 1 title: - - value: "Artikel 2 | tag1, tag2, cat1, branch1" + - value: 'Artikel 2 | tag1, tag2, cat1, branch1' created: - value: 1717497549 promote: @@ -31,15 +31,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Artikel 2 | tag1, tag2, cat1, branch1 | DPL CMS" + content: 'Artikel 2 | tag1, tag2, cat1, branch1 | DPL CMS' path: - alias: /branch1/articles/cat1/artikel-2-tag1-tag2-cat1-branch1 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/76c9684c-7178-4f75-ba67-58799f4d6fc0.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/76c9684c-7178-4f75-ba67-58799f4d6fc0.yml index 850174b8b..06fa3bb78 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/76c9684c-7178-4f75-ba67-58799f4d6fc0.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/76c9684c-7178-4f75-ba67-58799f4d6fc0.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 76c9684c-7178-4f75-ba67-58799f4d6fc0 bundle: branch @@ -25,7 +25,7 @@ default: - tag: meta attributes: name: title - content: "Branch2 | DPL CMS" + content: 'Branch2 | DPL CMS' path: - alias: /branch2 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/994a7d47-fe90-4ca8-a3b6-e9114d45d585.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/994a7d47-fe90-4ca8-a3b6-e9114d45d585.yml index f35813e01..a924b08a2 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/994a7d47-fe90-4ca8-a3b6-e9114d45d585.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/994a7d47-fe90-4ca8-a3b6-e9114d45d585.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: 994a7d47-fe90-4ca8-a3b6-e9114d45d585 bundle: article @@ -17,7 +17,7 @@ default: uid: - target_id: 1 title: - - value: "Artikel 5 | tag2, cat2, branch2" + - value: 'Artikel 5 | tag2, cat2, branch2' created: - value: 1717497685 promote: @@ -30,15 +30,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Artikel 5 | tag2, cat2, branch2 | DPL CMS" + content: 'Artikel 5 | tag2, cat2, branch2 | DPL CMS' path: - alias: /testfilialen/articles/cat2/artikel-5-tag2-cat2-branch2 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/cfd18e96-efb6-4e3b-af79-7a4033860f1d.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/cfd18e96-efb6-4e3b-af79-7a4033860f1d.yml index 45a5c7b42..48fd9dc84 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/cfd18e96-efb6-4e3b-af79-7a4033860f1d.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/cfd18e96-efb6-4e3b-af79-7a4033860f1d.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: cfd18e96-efb6-4e3b-af79-7a4033860f1d bundle: article @@ -18,7 +18,7 @@ default: uid: - target_id: 1 title: - - value: "Artikel 3 | tag1, tag2, cat1, branch1" + - value: 'Artikel 3 | tag1, tag2, cat1, branch1' created: - value: 1717497573 promote: @@ -31,15 +31,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Artikel 3 | tag1, tag2, cat1, branch1 | DPL CMS" + content: 'Artikel 3 | tag1, tag2, cat1, branch1 | DPL CMS' path: - alias: /branch1/articles/cat1/artikel-3-tag1-tag2-cat1-branch1 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/dd9b05c7-04ed-4cc0-95a0-91da2cc3d924.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/dd9b05c7-04ed-4cc0-95a0-91da2cc3d924.yml index 4b37a889d..3a4b183b0 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/dd9b05c7-04ed-4cc0-95a0-91da2cc3d924.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/dd9b05c7-04ed-4cc0-95a0-91da2cc3d924.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: dd9b05c7-04ed-4cc0-95a0-91da2cc3d924 bundle: article @@ -15,7 +15,7 @@ default: uid: - target_id: 1 title: - - value: "Artikel 6 | cat2" + - value: 'Artikel 6 | cat2' created: - value: 1717497734 promote: @@ -28,15 +28,15 @@ default: - value: false entity_clone_template_image: - entity: e00e1460-169e-468d-9835-d664f06d0969 - alt: "" - title: "" + alt: '' + title: '' width: 640 height: 443 metatag: - tag: meta attributes: name: title - content: "Artikel 6 | cat2 | DPL CMS" + content: 'Artikel 6 | cat2 | DPL CMS' path: - alias: /articles/cat2/artikel-6-cat2 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/ec9dd467-24d5-484f-b19a-e8653c493177.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/ec9dd467-24d5-484f-b19a-e8653c493177.yml index 4e605f8e6..a82eed4fc 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/ec9dd467-24d5-484f-b19a-e8653c493177.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/node/ec9dd467-24d5-484f-b19a-e8653c493177.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: ec9dd467-24d5-484f-b19a-e8653c493177 bundle: branch @@ -25,7 +25,7 @@ default: - tag: meta attributes: name: title - content: "Branch1 | DPL CMS" + content: 'Branch1 | DPL CMS' path: - alias: /branch1 langcode: und diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/3369e523-14d9-49a5-93e2-eda5585c6eaa.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/3369e523-14d9-49a5-93e2-eda5585c6eaa.yml index f0db4b9a2..c6b66256a 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/3369e523-14d9-49a5-93e2-eda5585c6eaa.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/3369e523-14d9-49a5-93e2-eda5585c6eaa.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 3369e523-14d9-49a5-93e2-eda5585c6eaa bundle: categories @@ -19,12 +19,12 @@ default: - tag: meta attributes: name: title - content: "Cat1 | DPL CMS" + content: 'Cat1 | DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/taxonomy/term/29" + href: 'http://dapple-cms.docker/taxonomy/term/29' path: - - alias: "" + - alias: '' langcode: da pathauto: 0 diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/5d70c9f7-779c-4337-a587-ced7a8ecc770.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/5d70c9f7-779c-4337-a587-ced7a8ecc770.yml index caf83d709..07eafb0d3 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/5d70c9f7-779c-4337-a587-ced7a8ecc770.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/5d70c9f7-779c-4337-a587-ced7a8ecc770.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 5d70c9f7-779c-4337-a587-ced7a8ecc770 bundle: tags @@ -19,12 +19,12 @@ default: - tag: meta attributes: name: title - content: "Tag2 | DPL CMS" + content: 'Tag2 | DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/taxonomy/term/28" + href: 'http://dapple-cms.docker/taxonomy/term/28' path: - - alias: "" + - alias: '' langcode: da pathauto: 1 diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/9df8ee6a-939d-4d8f-9d79-d082b00286ac.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/9df8ee6a-939d-4d8f-9d79-d082b00286ac.yml index 1552e0ca1..696cb822b 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/9df8ee6a-939d-4d8f-9d79-d082b00286ac.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/9df8ee6a-939d-4d8f-9d79-d082b00286ac.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 9df8ee6a-939d-4d8f-9d79-d082b00286ac bundle: categories @@ -19,12 +19,12 @@ default: - tag: meta attributes: name: title - content: "Cat2 | DPL CMS" + content: 'Cat2 | DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/taxonomy/term/27" + href: 'http://dapple-cms.docker/taxonomy/term/27' path: - - alias: "" + - alias: '' langcode: da pathauto: 0 diff --git a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/ab73e9ee-9195-4245-bb95-f5de1c4eb06f.yml b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/ab73e9ee-9195-4245-bb95-f5de1c4eb06f.yml index 045439022..11f2b7f20 100644 --- a/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/ab73e9ee-9195-4245-bb95-f5de1c4eb06f.yml +++ b/web/modules/custom/dpl_related_content/dpl_related_content_tests/content/taxonomy_term/ab73e9ee-9195-4245-bb95-f5de1c4eb06f.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: ab73e9ee-9195-4245-bb95-f5de1c4eb06f bundle: tags @@ -19,12 +19,12 @@ default: - tag: meta attributes: name: title - content: "Tag1 | DPL CMS" + content: 'Tag1 | DPL CMS' - tag: link attributes: rel: canonical - href: "http://dapple-cms.docker/taxonomy/term/26" + href: 'http://dapple-cms.docker/taxonomy/term/26' path: - - alias: "" + - alias: '' langcode: da pathauto: 1 diff --git a/web/modules/custom/dpl_reservations/dpl_reservations.links.menu.yml b/web/modules/custom/dpl_reservations/dpl_reservations.links.menu.yml index cbe9efd02..df6ed5785 100644 --- a/web/modules/custom/dpl_reservations/dpl_reservations.links.menu.yml +++ b/web/modules/custom/dpl_reservations/dpl_reservations.links.menu.yml @@ -1,5 +1,5 @@ dpl_reservations.list: - title: "Reservations" + title: 'Reservations' menu_name: user-profile-menu route_name: dpl_reservations.list - description: "List user reservations" + description: 'List user reservations' diff --git a/web/modules/custom/dpl_reservations/dpl_reservations.routing.yml b/web/modules/custom/dpl_reservations/dpl_reservations.routing.yml index 57a7bd85a..80c868c0a 100644 --- a/web/modules/custom/dpl_reservations/dpl_reservations.routing.yml +++ b/web/modules/custom/dpl_reservations/dpl_reservations.routing.yml @@ -1,6 +1,6 @@ dpl_reservations.list: - path: "/user/me/reservations" + path: '/user/me/reservations' defaults: _controller: '\Drupal\dpl_reservations\Controller\DplReservationsController::list' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_reservations/dpl_reservations.services.yml b/web/modules/custom/dpl_reservations/dpl_reservations.services.yml index 829158c09..d981e2f62 100644 --- a/web/modules/custom/dpl_reservations/dpl_reservations.services.yml +++ b/web/modules/custom/dpl_reservations/dpl_reservations.services.yml @@ -1,4 +1,4 @@ services: dpl_reservations.settings: class: Drupal\dpl_reservations\DplReservationsSettings - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_rest_base/dpl_rest_base.info.yml b/web/modules/custom/dpl_rest_base/dpl_rest_base.info.yml index 485afc698..08d6bd401 100644 --- a/web/modules/custom/dpl_rest_base/dpl_rest_base.info.yml +++ b/web/modules/custom/dpl_rest_base/dpl_rest_base.info.yml @@ -1,6 +1,6 @@ -name: "DPL REST base" +name: 'DPL REST base' type: module -description: "A base module for providing shared functionality between modules exposing REST services." +description: 'A base module for providing shared functionality between modules exposing REST services.' package: DPL core_version_requirement: ^10 dependencies: diff --git a/web/modules/custom/dpl_something_similar/dpl_something_similar.routing.yml b/web/modules/custom/dpl_something_similar/dpl_something_similar.routing.yml index 1c00cb032..feba56050 100644 --- a/web/modules/custom/dpl_something_similar/dpl_something_similar.routing.yml +++ b/web/modules/custom/dpl_something_similar/dpl_something_similar.routing.yml @@ -1,6 +1,6 @@ dpl_something_similar.list: - path: "/something-similar/{faust}" + path: '/something-similar/{faust}' defaults: _controller: '\Drupal\dpl_something_similar\Controller\DplSomethingSimilarController::list' requirements: - _permission: "access content" + _permission: 'access content' diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/568d85d3-41bc-4000-acae-47116d378289.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/568d85d3-41bc-4000-acae-47116d378289.yml index 1f1c72bc7..6b268a8d4 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/568d85d3-41bc-4000-acae-47116d378289.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/568d85d3-41bc-4000-acae-47116d378289.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 568d85d3-41bc-4000-acae-47116d378289 bundle: opening_hours_categories @@ -19,14 +19,14 @@ default: - tag: meta attributes: name: title - content: "Telefontid | DPL CMS" + content: 'Telefontid | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/18" + href: '/taxonomy/term/18' path: - - alias: "" + - alias: '' langcode: da field_opening_hours_color: - - color: "#4986E7" + - color: '#4986E7' opacity: 0.0 diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/72249209-22bb-4142-9fc6-350a152f264a.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/72249209-22bb-4142-9fc6-350a152f264a.yml index 70c5f65d6..50531f619 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/72249209-22bb-4142-9fc6-350a152f264a.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/72249209-22bb-4142-9fc6-350a152f264a.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 72249209-22bb-4142-9fc6-350a152f264a bundle: opening_hours_categories @@ -19,14 +19,14 @@ default: - tag: meta attributes: name: title - content: "Borgerservice | DPL CMS" + content: 'Borgerservice | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/19" + href: '/taxonomy/term/19' path: - - alias: "" + - alias: '' langcode: da field_opening_hours_color: - - color: "#4986E7" + - color: '#4986E7' opacity: 0.0 diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/9c2f0d96-88e1-497c-bf82-e18eb9d5769c.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/9c2f0d96-88e1-497c-bf82-e18eb9d5769c.yml index f0d502b7a..af8946ac1 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/9c2f0d96-88e1-497c-bf82-e18eb9d5769c.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/9c2f0d96-88e1-497c-bf82-e18eb9d5769c.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 9c2f0d96-88e1-497c-bf82-e18eb9d5769c bundle: opening_hours_categories @@ -19,14 +19,14 @@ default: - tag: meta attributes: name: title - content: "Åbent | DPL CMS" + content: 'Åbent | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/15" + href: '/taxonomy/term/15' path: - - alias: "" + - alias: '' langcode: da field_opening_hours_color: - - color: "#4986E7" + - color: '#4986E7' opacity: 0.0 diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/befe3036-a870-445f-a457-9f102154f64e.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/befe3036-a870-445f-a457-9f102154f64e.yml index f32d5e577..d53f2ad39 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/befe3036-a870-445f-a457-9f102154f64e.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/befe3036-a870-445f-a457-9f102154f64e.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: befe3036-a870-445f-a457-9f102154f64e bundle: opening_hours_categories @@ -19,14 +19,14 @@ default: - tag: meta attributes: name: title - content: "Selvbetjening | DPL CMS" + content: 'Selvbetjening | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/16" + href: '/taxonomy/term/16' path: - - alias: "" + - alias: '' langcode: da field_opening_hours_color: - - color: "#4986E7" + - color: '#4986E7' opacity: 0.0 diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/d3740bd9-1bd5-4376-8a7f-eb0b89e3b7e3.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/d3740bd9-1bd5-4376-8a7f-eb0b89e3b7e3.yml index d37632ad9..629a224be 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/d3740bd9-1bd5-4376-8a7f-eb0b89e3b7e3.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/content/taxonomy_term/d3740bd9-1bd5-4376-8a7f-eb0b89e3b7e3.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: d3740bd9-1bd5-4376-8a7f-eb0b89e3b7e3 bundle: opening_hours_categories @@ -8,7 +8,7 @@ default: status: - value: true name: - - value: "Med betjening" + - value: 'Med betjening' weight: - value: 0 parent: @@ -19,14 +19,14 @@ default: - tag: meta attributes: name: title - content: "Med betjening | DPL CMS" + content: 'Med betjening | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/17" + href: '/taxonomy/term/17' path: - - alias: "" + - alias: '' langcode: da field_opening_hours_color: - - color: "#4986E7" + - color: '#4986E7' opacity: 0.0 diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/dpl_static_content_20240404_opening_hours.info.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/dpl_static_content_20240404_opening_hours.info.yml index f765817e3..1336c7cf1 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/dpl_static_content_20240404_opening_hours.info.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240404_opening_hours/dpl_static_content_20240404_opening_hours.info.yml @@ -1,4 +1,4 @@ -name: "DPL static content: Opening hours categories" +name: 'DPL static content: Opening hours categories' type: module description: Adds default opening hours categories package: DPL diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/333d93e2-a403-4a0b-a57e-2e74e729887f.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/333d93e2-a403-4a0b-a57e-2e74e729887f.yml index 21de83d46..cad0f8e6c 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/333d93e2-a403-4a0b-a57e-2e74e729887f.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/333d93e2-a403-4a0b-a57e-2e74e729887f.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: path_alias uuid: 333d93e2-a403-4a0b-a57e-2e74e729887f default_langcode: und diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/67b61873-9ccf-4b2c-b2ee-cee553381bd2.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/67b61873-9ccf-4b2c-b2ee-cee553381bd2.yml index 1e209cf89..1773b1dcc 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/67b61873-9ccf-4b2c-b2ee-cee553381bd2.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/67b61873-9ccf-4b2c-b2ee-cee553381bd2.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: path_alias uuid: 67b61873-9ccf-4b2c-b2ee-cee553381bd2 default_langcode: und diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/fef6c6a4-f409-4ae8-84d5-c3497e2edf28.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/fef6c6a4-f409-4ae8-84d5-c3497e2edf28.yml index 3f02fe4f0..ad7610db2 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/fef6c6a4-f409-4ae8-84d5-c3497e2edf28.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/content/path_alias/fef6c6a4-f409-4ae8-84d5-c3497e2edf28.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: path_alias uuid: fef6c6a4-f409-4ae8-84d5-c3497e2edf28 default_langcode: und diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/dpl_static_content_20240418_views_aliases.info.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/dpl_static_content_20240418_views_aliases.info.yml index 858e0e621..cd100905f 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/dpl_static_content_20240418_views_aliases.info.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240418_views_aliases/dpl_static_content_20240418_views_aliases.info.yml @@ -1,4 +1,4 @@ -name: "DPL static content: Views aliases" +name: 'DPL static content: Views aliases' type: module description: Adds path aliases to core views pages package: DPL diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/node/d50683cc-8011-49ba-a6ea-82e56de97b80.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/node/d50683cc-8011-49ba-a6ea-82e56de97b80.yml index 6762d7ed1..e9897ee75 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/node/d50683cc-8011-49ba-a6ea-82e56de97b80.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/node/d50683cc-8011-49ba-a6ea-82e56de97b80.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: node uuid: d50683cc-8011-49ba-a6ea-82e56de97b80 bundle: page @@ -27,7 +27,7 @@ default: - tag: meta attributes: name: title - content: "Kontakt | DPL CMS" + content: 'Kontakt | DPL CMS' path: - alias: /kontakt langcode: und @@ -39,7 +39,7 @@ default: field_paragraphs: - entity: _meta: - version: "1.0" + version: '1.0' entity_type: paragraph uuid: 325c097a-7abc-47f9-ba77-f3e5a30a0fb2 bundle: webform @@ -55,9 +55,9 @@ default: - value: true field_webform: - target_id: contact - default_data: "" + default_data: '' status: open - open: "" - close: "" + open: '' + close: '' field_subtitle: - - value: "Kontakt dit lokale bibliotek ved at udfylde formularen nedenfor." + - value: 'Kontakt dit lokale bibliotek ved at udfylde formularen nedenfor.' diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/6d9e3138-f948-4d8b-aba1-3ca46a05175e.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/6d9e3138-f948-4d8b-aba1-3ca46a05175e.yml index 71ad82a36..38c1697db 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/6d9e3138-f948-4d8b-aba1-3ca46a05175e.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/6d9e3138-f948-4d8b-aba1-3ca46a05175e.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: 6d9e3138-f948-4d8b-aba1-3ca46a05175e bundle: webform_email_categories @@ -8,7 +8,7 @@ default: status: - value: true name: - - value: "Spørgsmål til biblioteket" + - value: 'Spørgsmål til biblioteket' weight: - value: 0 parent: @@ -19,13 +19,13 @@ default: - tag: meta attributes: name: title - content: "Spørgsmål til biblioteket | DPL CMS" + content: 'Spørgsmål til biblioteket | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/22" + href: '/taxonomy/term/22' path: - - alias: "" + - alias: '' langcode: da field_email: - value: questions@test.dk diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b42cf13a-4047-4a36-b451-f632472c8035.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b42cf13a-4047-4a36-b451-f632472c8035.yml index 35c3e0991..b1bbc96ab 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b42cf13a-4047-4a36-b451-f632472c8035.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b42cf13a-4047-4a36-b451-f632472c8035.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: b42cf13a-4047-4a36-b451-f632472c8035 bundle: webform_email_categories @@ -8,7 +8,7 @@ default: status: - value: true name: - - value: "Gebyrer og erstatninger" + - value: 'Gebyrer og erstatninger' weight: - value: 0 parent: @@ -19,13 +19,13 @@ default: - tag: meta attributes: name: title - content: "Gebyrer og erstatninger | DPL CMS" + content: 'Gebyrer og erstatninger | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/25" + href: '/taxonomy/term/25' path: - - alias: "" + - alias: '' langcode: da field_email: - value: fees@test.dk diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b97946d7-f415-45e7-bd48-131d3675fbd0.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b97946d7-f415-45e7-bd48-131d3675fbd0.yml index 6ff660b50..07fdfecf3 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b97946d7-f415-45e7-bd48-131d3675fbd0.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/b97946d7-f415-45e7-bd48-131d3675fbd0.yml @@ -1,5 +1,5 @@ _meta: - version: "1.0" + version: '1.0' entity_type: taxonomy_term uuid: b97946d7-f415-45e7-bd48-131d3675fbd0 bundle: webform_email_categories @@ -8,7 +8,7 @@ default: status: - value: true name: - - value: "Hjemmeside og app" + - value: 'Hjemmeside og app' weight: - value: 0 parent: @@ -19,13 +19,13 @@ default: - tag: meta attributes: name: title - content: "Hjemmeside og app | DPL CMS" + content: 'Hjemmeside og app | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/24" + href: '/taxonomy/term/24' path: - - alias: "" + - alias: '' langcode: da field_email: - value: web@test.dk diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/bb4917fe-2197-4d53-b3e8-4a04ce074c29.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/bb4917fe-2197-4d53-b3e8-4a04ce074c29.yml index 83aa9fc18..b2586aff7 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/bb4917fe-2197-4d53-b3e8-4a04ce074c29.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/content/taxonomy_term/bb4917fe-2197-4d53-b3e8-4a04ce074c29.yml @@ -8,7 +8,7 @@ default: status: - value: true name: - - value: "Forslag til indkøb" + - value: 'Forslag til indkøb' weight: - value: 0 parent: @@ -19,13 +19,13 @@ default: - tag: meta attributes: name: title - content: "Forslag til indkøb | DPL CMS" + content: 'Forslag til indkøb | DPL CMS' - tag: link attributes: rel: canonical - href: "/taxonomy/term/23" + href: '/taxonomy/term/23' path: - - alias: "" + - alias: '' langcode: da field_email: - value: suggestions@test.dk diff --git a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/dpl_static_content_20240422_contact_page.info.yml b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/dpl_static_content_20240422_contact_page.info.yml index 09a045dd6..e80a800a0 100644 --- a/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/dpl_static_content_20240422_contact_page.info.yml +++ b/web/modules/custom/dpl_static_content/modules/dpl_static_content_20240422_contact_page/dpl_static_content_20240422_contact_page.info.yml @@ -1,4 +1,4 @@ -name: "DPL static content: Contact page" +name: 'DPL static content: Contact page' type: module description: Adds default contact page and contact webform categories package: DPL diff --git a/web/modules/custom/dpl_unilogin/dpl_unilogin.info.yml b/web/modules/custom/dpl_unilogin/dpl_unilogin.info.yml index 0e86cdd4c..30b26f9d9 100644 --- a/web/modules/custom/dpl_unilogin/dpl_unilogin.info.yml +++ b/web/modules/custom/dpl_unilogin/dpl_unilogin.info.yml @@ -1,5 +1,5 @@ -name: "DPL UniLogin" +name: 'DPL UniLogin' type: module -description: "Module containing unilogin configuration" +description: 'Module containing unilogin configuration' package: DPL core_version_requirement: ^10 || ^11 diff --git a/web/modules/custom/dpl_unilogin/dpl_unilogin.links.menu.yml b/web/modules/custom/dpl_unilogin/dpl_unilogin.links.menu.yml index 82dacdaa8..07b3a1083 100644 --- a/web/modules/custom/dpl_unilogin/dpl_unilogin.links.menu.yml +++ b/web/modules/custom/dpl_unilogin/dpl_unilogin.links.menu.yml @@ -1,5 +1,5 @@ dpl_unilogin.settings_form: - title: "UniLogin configuration" + title: 'UniLogin configuration' route_name: dpl_unilogin.settings - description: "Change UniLogin configuration" + description: 'Change UniLogin configuration' parent: system.admin_config_services diff --git a/web/modules/custom/dpl_unilogin/dpl_unilogin.routing.yml b/web/modules/custom/dpl_unilogin/dpl_unilogin.routing.yml index ae74008b4..8435e5041 100644 --- a/web/modules/custom/dpl_unilogin/dpl_unilogin.routing.yml +++ b/web/modules/custom/dpl_unilogin/dpl_unilogin.routing.yml @@ -1,9 +1,9 @@ dpl_unilogin.settings: - path: "/admin/config/services/unilogin-configuration" + path: '/admin/config/services/unilogin-configuration' defaults: _form: '\Drupal\dpl_unilogin\Form\UniloginConfigurationForm' - _title: "Unilogin configuration" + _title: 'Unilogin configuration' requirements: - _permission: "administer site configuration" + _permission: 'administer site configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_unilogin/dpl_unilogin.services.yml b/web/modules/custom/dpl_unilogin/dpl_unilogin.services.yml index 89ab38091..9faf99071 100644 --- a/web/modules/custom/dpl_unilogin/dpl_unilogin.services.yml +++ b/web/modules/custom/dpl_unilogin/dpl_unilogin.services.yml @@ -1,4 +1,4 @@ services: dpl_unilogin.settings: class: Drupal\dpl_unilogin\UniloginConfiguration - arguments: ["@config.manager"] + arguments: ['@config.manager'] diff --git a/web/modules/custom/dpl_update/dpl_update.info.yml b/web/modules/custom/dpl_update/dpl_update.info.yml index a45b6afbd..ccd34d3ce 100644 --- a/web/modules/custom/dpl_update/dpl_update.info.yml +++ b/web/modules/custom/dpl_update/dpl_update.info.yml @@ -1,6 +1,6 @@ -name: "DPL Update" +name: 'DPL Update' type: module -description: "Generalized update logic, such as enabling modules." +description: 'Generalized update logic, such as enabling modules.' package: DPL core_version_requirement: ^10 dependencies: diff --git a/web/modules/custom/dpl_update/dpl_update.install b/web/modules/custom/dpl_update/dpl_update.install index d106e1689..91c7e54d7 100644 --- a/web/modules/custom/dpl_update/dpl_update.install +++ b/web/modules/custom/dpl_update/dpl_update.install @@ -104,8 +104,11 @@ function dpl_update_install(): string { $messages[] = dpl_update_update_10022(); $messages[] = dpl_update_update_10023(); $messages[] = dpl_update_update_10024(); + // Do not uninstall dblog module on install. It is not installed by default. // $messages[] = dpl_update_update_10025() + $messages[] = dpl_update_update_10026(); + $messages[] = dpl_update_update_10027(); return implode('\r\n', $messages); } @@ -302,3 +305,24 @@ function dpl_update_update_10024(): string { function dpl_update_update_10025(): string { return _dpl_update_uninstall_modules(['dblog']); } + +/** + * Install dpl_webmaster. + */ +function dpl_update_update_10026(): string { + return _dpl_update_install_modules(['dpl_webmaster']); +} + +/** + * Install simple_oauth. + */ +function dpl_update_update_10027(): string { + return _dpl_update_install_modules(['simple_oauth']); +} + +/** + * Uninstall config_filter. + */ +function dpl_update_update_10028(): string { + return _dpl_update_uninstall_modules(['config_filter']); +} diff --git a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.info.yml b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.info.yml index b3d2242f2..dccdf5874 100644 --- a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.info.yml +++ b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.info.yml @@ -1,5 +1,5 @@ -name: "DPL Url Proxy" +name: 'DPL Url Proxy' type: module -description: "Module for generating specially formatted external urls" -package: "DPL" +description: 'Module for generating specially formatted external urls' +package: 'DPL' core_version_requirement: ^9 || ^10 diff --git a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.links.menu.yml b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.links.menu.yml index a5f32a0c0..a538548ad 100644 --- a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.links.menu.yml +++ b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.links.menu.yml @@ -1,5 +1,5 @@ dpl_url_proxy.admin_settings: - title: "Url proxy settings" - description: "Configure the host names and replacement patterns for proxy urls." + title: 'Url proxy settings' + description: 'Configure the host names and replacement patterns for proxy urls.' route_name: dpl_url_proxy.configure parent: dpl_library_agency.settings diff --git a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.permissions.yml b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.permissions.yml index 35ef86ac5..3c4f2c28f 100644 --- a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.permissions.yml +++ b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.permissions.yml @@ -1,3 +1,3 @@ administer url proxy configuration: - title: "Administer url proxy configuration" - description: "Access for administering of the url proxy configuration." + title: 'Administer url proxy configuration' + description: 'Access for administering of the url proxy configuration.' diff --git a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.routing.yml b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.routing.yml index 730db1d0d..16ec39906 100644 --- a/web/modules/custom/dpl_url_proxy/dpl_url_proxy.routing.yml +++ b/web/modules/custom/dpl_url_proxy/dpl_url_proxy.routing.yml @@ -1,9 +1,9 @@ dpl_url_proxy.configure: - path: "admin/config/services/dpl-url-proxy" + path: 'admin/config/services/dpl-url-proxy' defaults: _form: '\Drupal\dpl_url_proxy\Form\ProxyUrlConfigurationForm' - _title: "Configure proxy urls" + _title: 'Configure proxy urls' requirements: - _permission: "administer url proxy configuration" + _permission: 'administer url proxy configuration' options: _admin_route: TRUE diff --git a/web/modules/custom/dpl_webform/dpl_webform.info.yml b/web/modules/custom/dpl_webform/dpl_webform.info.yml index f97d1c144..0fba97016 100644 --- a/web/modules/custom/dpl_webform/dpl_webform.info.yml +++ b/web/modules/custom/dpl_webform/dpl_webform.info.yml @@ -1,5 +1,5 @@ -name: "DPL Webform" -description: "Handles custom webform configuration" +name: 'DPL Webform' +description: 'Handles custom webform configuration' package: DPL type: module diff --git a/web/modules/custom/dpl_webform/dpl_webform.permissions.yml b/web/modules/custom/dpl_webform/dpl_webform.permissions.yml index d949c5463..30d044f6e 100644 --- a/web/modules/custom/dpl_webform/dpl_webform.permissions.yml +++ b/web/modules/custom/dpl_webform/dpl_webform.permissions.yml @@ -1,30 +1,30 @@ administer advanced webform access settings: - title: "Administer advanced webform access settings" - description: "Administer advanced webform access settings for webforms." + title: 'Administer advanced webform access settings' + description: 'Administer advanced webform access settings for webforms.' restrict access: true administer advanced webform confirmation settings: - title: "Administer advanced webform confirmation settings" - description: "Administer advanced webform confirmation settings for webforms." + title: 'Administer advanced webform confirmation settings' + description: 'Administer advanced webform confirmation settings for webforms.' administer advanced webform element settings: - title: "Administer advanced webform element settings" - description: "Administer advanced webform element settings for webforms." + title: 'Administer advanced webform element settings' + description: 'Administer advanced webform element settings for webforms.' administer advanced webform form settings: - title: "Administer advanced webform form settings" - description: "Administer advanced webform form settings for webforms." + title: 'Administer advanced webform form settings' + description: 'Administer advanced webform form settings for webforms.' restrict access: true administer advanced webform general settings: - title: "Administer advanced webform general settings" - description: "Administer advanced webform general settings for webforms." + title: 'Administer advanced webform general settings' + description: 'Administer advanced webform general settings for webforms.' administer advanced webform handler settings: - title: "Administer advanced webform handler settings" - description: "Administer advanced webform handler settings for webforms." + title: 'Administer advanced webform handler settings' + description: 'Administer advanced webform handler settings for webforms.' administer advanced webform submission settings: - title: "Administer advanced webform submission settings" - description: "Administer advanced webform submission settings for webforms." + title: 'Administer advanced webform submission settings' + description: 'Administer advanced webform submission settings for webforms.' restrict access: true diff --git a/web/modules/custom/dpl_webmaster/dpl_webmaster.info.yml b/web/modules/custom/dpl_webmaster/dpl_webmaster.info.yml new file mode 100644 index 000000000..aa1c0db03 --- /dev/null +++ b/web/modules/custom/dpl_webmaster/dpl_webmaster.info.yml @@ -0,0 +1,8 @@ +name: Webmaster +type: module +description: 'Webmaster library support functionality' +package: 'DPL' +core_version_requirement: ^10 + +dependencies: + - drupal:update diff --git a/web/modules/custom/dpl_webmaster/dpl_webmaster.links.action.yml b/web/modules/custom/dpl_webmaster/dpl_webmaster.links.action.yml new file mode 100644 index 000000000..25c80f6fa --- /dev/null +++ b/web/modules/custom/dpl_webmaster/dpl_webmaster.links.action.yml @@ -0,0 +1,5 @@ +dpl_webmaster.install_or_update: + route_name: dpl_webmaster.install_or_update + title: 'Add new or update module' + appears_on: + - system.modules_list diff --git a/web/modules/custom/dpl_webmaster/dpl_webmaster.routing.yml b/web/modules/custom/dpl_webmaster/dpl_webmaster.routing.yml new file mode 100644 index 000000000..f7948381b --- /dev/null +++ b/web/modules/custom/dpl_webmaster/dpl_webmaster.routing.yml @@ -0,0 +1,10 @@ +dpl_webmaster.install_or_update: + path: '/admin/modules/install-or-update' + defaults: + _form: '\Drupal\dpl_webmaster\Form\InstallOrUpdateModule' + _title: 'Install or update module' + requirements: + _permission: 'administer software updates' + # Respect the allow_authorize_operations settings from + # settings.php. See default.settings.php for details. + _access_update_manager: 'TRUE' diff --git a/web/modules/custom/dpl_webmaster/dpl_webmaster.services.yml b/web/modules/custom/dpl_webmaster/dpl_webmaster.services.yml new file mode 100644 index 000000000..269fbc3fe --- /dev/null +++ b/web/modules/custom/dpl_webmaster/dpl_webmaster.services.yml @@ -0,0 +1,5 @@ +services: + dpl_webmaster.route_subscriber: + class: Drupal\dpl_webmaster\Routing\RouteSubscriber + tags: + - { name: event_subscriber } diff --git a/web/modules/custom/dpl_webmaster/src/Form/InstallOrUpdateModule.php b/web/modules/custom/dpl_webmaster/src/Form/InstallOrUpdateModule.php new file mode 100644 index 000000000..c211948d9 --- /dev/null +++ b/web/modules/custom/dpl_webmaster/src/Form/InstallOrUpdateModule.php @@ -0,0 +1,294 @@ +get('update.root'), + $container->get('module_handler'), + $container->getParameter('site.path'), + $container->get('plugin.manager.archiver'), + $container->get('file_system'), + $container->get('state'), + $container->get('session'), + ); + } + + /** + * {@inheritdoc} + */ + public function buildForm(array $form, FormStateInterface $form_state): array { + // This is an unchanged copy of UpdateManagerInstall::buildForm(). + $this->moduleHandler->loadInclude('update', 'inc', 'update.manager'); + if (!_update_manager_check_backends($form, 'install')) { + return $form; + } + + $form['help_text'] = [ + '#prefix' => '

', + '#markup' => $this->t('You can find modules and themes on drupal.org. The following file extensions are supported: %extensions.', [ + ':module_url' => 'https://www.drupal.org/project/modules', + ':theme_url' => 'https://www.drupal.org/project/themes', + ':drupal_org_url' => 'https://www.drupal.org', + '%extensions' => $this->archiverManager->getExtensions(), + ]), + '#suffix' => '

', + ]; + + $form['project_url'] = [ + '#type' => 'url', + '#title' => $this->t('Add from a URL'), + '#description' => $this->t('For example: %url', ['%url' => 'https://ftp.drupal.org/files/projects/name.tar.gz']), + ]; + + // Provide upload option only if file module exists. + if ($this->moduleHandler->moduleExists('file')) { + $form['information'] = [ + '#prefix' => '', + '#markup' => $this->t('Or'), + '#suffix' => '', + ]; + + $form['project_upload'] = [ + '#type' => 'file', + '#title' => $this->t('Upload a module or theme archive'), + '#description' => $this->t('For example: %filename from your local computer', ['%filename' => 'name.tar.gz']), + ]; + } + + $form['actions'] = ['#type' => 'actions']; + $form['actions']['submit'] = [ + '#type' => 'submit', + '#button_type' => 'primary', + '#value' => $this->t('Continue'), + ]; + + return $form; + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state): void { + // Same as UpdateManagerInstall::validateForm(); + $all_files = $this->getRequest()->files->get('files', []); + if ($this->moduleHandler->moduleExists('file')) { + if (!($form_state->getValue('project_url') xor !empty($all_files['project_upload']))) { + $form_state->setErrorByName('project_url', $this->t('You must either provide a URL or upload an archive file.')); + } + } + else { + if (!($form_state->getValue('project_url'))) { + $form_state->setErrorByName('project_url', $this->t('You must provide a URL to install.')); + } + } + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state): void { + // This is mostly a copy of UpdateManagerInstall::submitForm(), apart from + // the handling of already installed modules and file permissions check + // (search for 'UpdateManagerInstall'). + $local_cache = ''; + $all_files = $this->getRequest()->files->get('files', []); + if ($form_state->getValue('project_url')) { + $local_cache = update_manager_file_get($form_state->getValue('project_url')); + if (!$local_cache) { + $this->messenger()->addError($this->t('Unable to retrieve Drupal project from %url.', ['%url' => $form_state->getValue('project_url')])); + return; + } + } + elseif (!empty($all_files['project_upload']) && $this->moduleHandler->moduleExists('file')) { + $validators = ['FileExtension' => ['extensions' => $this->archiverManager->getExtensions()]]; + /** @var \Drupal\file\FileInterface|null $finfo */ + $finfo = file_save_upload('project_upload', $validators, FALSE, 0, FileExists::Replace); + if (!$finfo) { + // Failed to upload the file. file_save_upload() calls + // \Drupal\Core\Messenger\MessengerInterface::addError() on failure. + return; + } + /** @var string $local_cache */ + $local_cache = $finfo->getFileUri(); + } + + $directory = _update_manager_extract_directory(); + try { + $archive = update_manager_archive_extract($local_cache, $directory); + } + catch (\Exception $e) { + $this->messenger()->addError($e->getMessage()); + return; + } + + $files = $archive->listContents(); + if (!$files) { + $this->messenger()->addError($this->t('Provided archive contains no files.')); + return; + } + + // Unfortunately, we can only use the directory name to determine the + // project name. Some archivers list the first file as the directory (i.e., + // MODULE/) and others list an actual file (i.e., MODULE/README.TXT). + $project = strtok($files[0], '/\\'); + + $archive_errors = $this->moduleHandler->invokeAll('verify_update_archive', [$project, $local_cache, $directory]); + if (!empty($archive_errors)) { + $this->messenger()->addError(array_shift($archive_errors)); + // @todo Fix me in D8: We need a way to set multiple errors on the same + // form element and have all of them appear! + if (!empty($archive_errors)) { + foreach ($archive_errors as $error) { + $this->messenger()->addError($error); + } + } + return; + } + + // Make sure the Updater registry is loaded. + drupal_get_updaters(); + + $project_location = $directory . '/' . $project; + try { + $updater = Updater::factory($project_location, $this->root); + } + catch (\Exception $e) { + $this->messenger()->addError($e->getMessage()); + return; + } + + try { + $project_title = Updater::getProjectTitle($project_location); + } + catch (\Exception $e) { + $this->messenger()->addError($e->getMessage()); + return; + } + + if (!$project_title) { + $this->messenger()->addError($this->t('Unable to determine %project name.', ['%project' => $project])); + } + + if (!$updater instanceof Module) { + $this->messenger()->addError($this->t('%project is not a module.', ['%project' => $project])); + return; + } + + // This is where we diverge from UpdateManagerInstall. It simply errors out, + // we set a session variable to tell /admin/update/ready which module to + // update and redirect to it instead. It'll pick up the files for the module + // as we've already extracted it in the directory where it expects to find + // it. + if ($updater->isInstalled()) { + // Tell UpdateReady form which projects to update. + $this->session->set('update_manager_update_projects', [$project => $project]); + $form_state->setRedirect('update.confirmation_page'); + return; + } + + $project_real_location = $this->fileSystem->realpath($project_location); + $arguments = [ + 'project' => $project, + 'updater_name' => get_class($updater), + 'local_url' => $project_real_location, + ]; + + // This process is inherently difficult to test therefore use a state flag. + $test_authorize = FALSE; + if (drupal_valid_test_ua()) { + $test_authorize = $this->state->get('test_uploaders_via_prompt', FALSE); + } + + // This is the other difference from UpdateManagerInstall. Core checks if it + // can update the files directly by checking that the owner of the uploaded + // module files is the same as the owner of the site directory, but that + // doesn't work in our case. In reality, the only proper test is actually + // trying to write the files, so we just assume here. + if (!$test_authorize) { + $this->moduleHandler->loadInclude('update', 'inc', 'update.authorize'); + $filetransfer = new Local($this->root, $this->fileSystem); + $response = call_user_func_array('update_authorize_run_install', array_merge([$filetransfer], $arguments)); + if ($response instanceof Response) { + $form_state->setResponse($response); + } + } + + // Otherwise, go through the regular workflow to prompt for FTP/SSH + // credentials and invoke update_authorize_run_install() indirectly with + // whatever FileTransfer object authorize.php creates for us. + else { + // The page title must be passed here to ensure it is initially used when + // authorize.php loads for the first time with the FTP/SSH credentials + // form. + system_authorized_init('update_authorize_run_install', __DIR__ . '/../../update.authorize.inc', $arguments, $this->t('Update manager')); + $form_state->setRedirectUrl(system_authorized_get_url()); + } + } + +} diff --git a/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php b/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php new file mode 100644 index 000000000..140100b4e --- /dev/null +++ b/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php @@ -0,0 +1,34 @@ +get('update.module_install')) { + $route->setRequirement('_access', 'FALSE'); + } + + // Remove /admin/modules/update. It won't work for the majority of the + // listed modules (webmasters can't update contrib modules provided by DPL + // anyway). Limiting it to webmaster uploaded, Drupal contrib modules would + // be a nicer alternative, but currently out of scope. + if ($route = $collection->get('update.module_update')) { + $route->setRequirement('_access', 'FALSE'); + } + } + +} diff --git a/web/modules/custom/drupal_typed/drupal_typed.info.yml b/web/modules/custom/drupal_typed/drupal_typed.info.yml index 3d1754910..17540a448 100644 --- a/web/modules/custom/drupal_typed/drupal_typed.info.yml +++ b/web/modules/custom/drupal_typed/drupal_typed.info.yml @@ -1,5 +1,5 @@ -name: "DrupalTyped" +name: 'DrupalTyped' type: module -description: "Better, faster, stronger types" +description: 'Better, faster, stronger types' package: Development core_version_requirement: ^10 diff --git a/web/modules/custom/media_twentythree/media_twentythree.info.yml b/web/modules/custom/media_twentythree/media_twentythree.info.yml index b091a7ffc..fdcfb9283 100644 --- a/web/modules/custom/media_twentythree/media_twentythree.info.yml +++ b/web/modules/custom/media_twentythree/media_twentythree.info.yml @@ -1,6 +1,6 @@ -name: "TwentyThree" +name: 'TwentyThree' type: module -description: "Integrate the TwentyThree video platform into the Media module with oEmbed support" +description: 'Integrate the TwentyThree video platform into the Media module with oEmbed support' package: Media core_version_requirement: ^10 diff --git a/web/modules/custom/media_twentythree/media_twentythree.services.yml b/web/modules/custom/media_twentythree/media_twentythree.services.yml index 67ac4db29..766bf98c3 100644 --- a/web/modules/custom/media_twentythree/media_twentythree.services.yml +++ b/web/modules/custom/media_twentythree/media_twentythree.services.yml @@ -3,7 +3,7 @@ services: decorates: media.oembed.provider_repository class: Drupal\media_twentythree\ProviderRepositoryDecorator public: false - arguments: ["@media_twentythree.oembed.provider_repository.inner"] + arguments: ['@media_twentythree.oembed.provider_repository.inner'] media_twentythree.oembed.url_resolver: class: Drupal\media_twentythree\DiscoveryUrlResolver parent: media.oembed.url_resolver diff --git a/web/profiles/dpl_cms/dpl_cms.info.yml b/web/profiles/dpl_cms/dpl_cms.info.yml index 1147159bb..55c6b8aeb 100644 --- a/web/profiles/dpl_cms/dpl_cms.info.yml +++ b/web/profiles/dpl_cms/dpl_cms.info.yml @@ -1,6 +1,6 @@ name: DPL CMS type: profile -description: "Web platform for the Danish Public Libraries" +description: 'Web platform for the Danish Public Libraries' core_version_requirement: ^9 || ^10 distribution: @@ -22,5 +22,5 @@ distribution: # Note that this will not set any theme as the default theme. #themes: -"interface translation project": dpl_cms -"interface translation server pattern": https://danskernesdigitalebibliotek.github.io/dpl-cms/translations/%language.po +'interface translation project': dpl_cms +'interface translation server pattern': https://danskernesdigitalebibliotek.github.io/dpl-cms/translations/%language.po diff --git a/web/profiles/dpl_cms/translations/da.combined.po b/web/profiles/dpl_cms/translations/da.combined.po index 5de097fda..c063fbf4f 100644 --- a/web/profiles/dpl_cms/translations/da.combined.po +++ b/web/profiles/dpl_cms/translations/da.combined.po @@ -4,23 +4,11 @@ # #-#-#-#-# da.config.po (PROJECT VERSION) #-#-#-#-# # da translation of DPL CMS # -#, fuzzy msgid "" msgstr "" -"#-#-#-#-# da.po (PROJECT VERSION) #-#-#-#-#\n" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2024-11-19 18:18+0100\n" -"PO-Revision-Date: 2024-11-19 18:18+0100\n" -"Last-Translator: NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"#-#-#-#-# da.config.po (PROJECT VERSION) #-#-#-#-#\n" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2024-11-19 18:19+0100\n" -"PO-Revision-Date: 2024-11-19 18:19+0100\n" +"POT-Creation-Date: 2024-11-26 17:18+0100\n" +"PO-Revision-Date: 2024-11-26 17:18+0100\n" "Last-Translator: NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -40,6 +28,54 @@ msgstr "Søg" msgid "Open link in new window/tab" msgstr "" +msgid "" +"You can find modules and themes on drupal.org. The " +"following file extensions are supported: %extensions." +msgstr "" +"Du kan finde moduler og temaerdrupal.org. De " +"følgende filendelser er understøttet: %extensions." + +msgid "Add from a URL" +msgstr "" + +msgid "For example: %url" +msgstr "For eksempel: %url" + +msgid "Or" +msgstr "Eller" + +msgid "Upload a module or theme archive" +msgstr "" + +msgid "For example: %filename from your local computer" +msgstr "For eksempel: %filename fra din egen computer" + +msgid "Continue" +msgstr "Fortsæt" + +msgid "You must either provide a URL or upload an archive file." +msgstr "" + +msgid "You must provide a URL to install." +msgstr "" + +msgid "Unable to retrieve Drupal project from %url." +msgstr "Kan ikke hente Drupal-projekt fra %url." + +msgid "Provided archive contains no files." +msgstr "Det angivne arkiv indeholder ingen filer." + +msgid "Unable to determine %project name." +msgstr "Kan ikke fastslå %project navn." + +msgid "%project is not a module." +msgstr "" + +msgid "Update manager" +msgstr "Update manager" + msgctxt "dpl_instant_loan" msgid "Enabled" msgstr "Tilvælg" @@ -4142,6 +4178,18 @@ msgstr "" msgid "Add functionality to link field" msgstr "" +msgid "Webmaster" +msgstr "" + +msgid "Webmaster library support functionality" +msgstr "" + +msgid "Add new or update module" +msgstr "" + +msgid "Install or update module" +msgstr "" + msgid "Article" msgstr "Artikel" @@ -6903,9 +6951,6 @@ msgctxt "Entity type group" msgid "Content" msgstr "Indhold" -msgid "Continue" -msgstr "Fortsæt" - msgid "Save and continue" msgstr "Gem og fortsæt" @@ -9090,6 +9135,15 @@ msgstr "" msgid "Show edit button" msgstr "Vis redigeringsknap" +msgid "Edit form mode: @form_mode" +msgstr "" + +msgid "Form mode" +msgstr "Formulartilstand" + +msgid "You can select in which mode edit form will be rendered." +msgstr "" + msgid "Edit media item" msgstr "Rediger medieelement" @@ -21242,6 +21296,30 @@ msgctxt "search_api.server.db_search:name" msgid "DB Search" msgstr "DB Søgning" +msgctxt "simple_oauth.oauth2_token.bundle.access_token:label" +msgid "Access Token" +msgstr "" + +msgctxt "simple_oauth.oauth2_token.bundle.access_token:description" +msgid "The access token type." +msgstr "" + +msgctxt "simple_oauth.oauth2_token.bundle.auth_code:label" +msgid "Auth code" +msgstr "" + +msgctxt "simple_oauth.oauth2_token.bundle.auth_code:description" +msgid "The auth code type." +msgstr "" + +msgctxt "simple_oauth.oauth2_token.bundle.refresh_token:label" +msgid "Refresh token" +msgstr "" + +msgctxt "simple_oauth.oauth2_token.bundle.refresh_token:description" +msgid "The refresh token type." +msgstr "" + msgctxt "system.action.eventinstance_break_lock_action:label" msgid "Break lock eventinstance" msgstr "" diff --git a/web/themes/custom/novel/novel.info.yml b/web/themes/custom/novel/novel.info.yml index d18fb33a7..a38906c1a 100644 --- a/web/themes/custom/novel/novel.info.yml +++ b/web/themes/custom/novel/novel.info.yml @@ -1,7 +1,7 @@ name: Novel type: theme base theme: stable9 -description: "Custom theme for the Danish Public Libraries" +description: 'Custom theme for the Danish Public Libraries' core_version_requirement: ^9 || ^10 # We want to add dpl_react as a module dependency @@ -19,9 +19,9 @@ libraries: - novel/base regions: - header: "Header" - content: "Content" - footer: "Footer" + header: 'Header' + content: 'Content' + footer: 'Footer' ckeditor5-stylesheets: - assets/dpl-design-system/css/wysiwyg.css diff --git a/web/themes/custom/novel/novel.libraries.yml b/web/themes/custom/novel/novel.libraries.yml index 9eb2ee825..c2717d89a 100644 --- a/web/themes/custom/novel/novel.libraries.yml +++ b/web/themes/custom/novel/novel.libraries.yml @@ -23,17 +23,17 @@ slider: - novel/swiper swiper: - remote: "https://github.com/nolimits4web/swiper.git" + remote: 'https://github.com/nolimits4web/swiper.git' license: name: MIT url: https://github.com/nolimits4web/swiper/blob/master/LICENSE gpl-compatible: true js: - "https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js": + 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js': { type: external } css: theme: - "https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css": + 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css': { type: external } footer-accordions: js: diff --git a/yarn.lock b/yarn.lock index 97310a786..5fd6a7d42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -318,62 +318,62 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz#c95c6521e70c8b095a684d884d96c0c1c63747d2" - integrity sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg== +"@typescript-eslint/eslint-plugin@^8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.16.0.tgz#ac56825bcdf3b392fc76a94b1315d4a162f201a6" + integrity sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.15.0" - "@typescript-eslint/type-utils" "8.15.0" - "@typescript-eslint/utils" "8.15.0" - "@typescript-eslint/visitor-keys" "8.15.0" + "@typescript-eslint/scope-manager" "8.16.0" + "@typescript-eslint/type-utils" "8.16.0" + "@typescript-eslint/utils" "8.16.0" + "@typescript-eslint/visitor-keys" "8.16.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.15.0.tgz#92610da2b3af702cfbc02a46e2a2daa6260a9045" - integrity sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A== +"@typescript-eslint/parser@^8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.16.0.tgz#ee5b2d6241c1ab3e2e53f03fd5a32d8e266d8e06" + integrity sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w== dependencies: - "@typescript-eslint/scope-manager" "8.15.0" - "@typescript-eslint/types" "8.15.0" - "@typescript-eslint/typescript-estree" "8.15.0" - "@typescript-eslint/visitor-keys" "8.15.0" + "@typescript-eslint/scope-manager" "8.16.0" + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/typescript-estree" "8.16.0" + "@typescript-eslint/visitor-keys" "8.16.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz#28a1a0f13038f382424f45a988961acaca38f7c6" - integrity sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA== +"@typescript-eslint/scope-manager@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz#ebc9a3b399a69a6052f3d88174456dd399ef5905" + integrity sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg== dependencies: - "@typescript-eslint/types" "8.15.0" - "@typescript-eslint/visitor-keys" "8.15.0" + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/visitor-keys" "8.16.0" -"@typescript-eslint/type-utils@8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz#a6da0f93aef879a68cc66c73fe42256cb7426c72" - integrity sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw== +"@typescript-eslint/type-utils@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz#585388735f7ac390f07c885845c3d185d1b64740" + integrity sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg== dependencies: - "@typescript-eslint/typescript-estree" "8.15.0" - "@typescript-eslint/utils" "8.15.0" + "@typescript-eslint/typescript-estree" "8.16.0" + "@typescript-eslint/utils" "8.16.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.15.0.tgz#4958edf3d83e97f77005f794452e595aaf6430fc" - integrity sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ== +"@typescript-eslint/types@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737" + integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ== -"@typescript-eslint/typescript-estree@8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz#915c94e387892b114a2a2cc0df2d7f19412c8ba7" - integrity sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg== +"@typescript-eslint/typescript-estree@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz#9d741e56e5b13469b5190e763432ce5551a9300c" + integrity sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw== dependencies: - "@typescript-eslint/types" "8.15.0" - "@typescript-eslint/visitor-keys" "8.15.0" + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/visitor-keys" "8.16.0" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -381,22 +381,22 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.15.0.tgz#ac04679ad19252776b38b81954b8e5a65567cef6" - integrity sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ== +"@typescript-eslint/utils@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3" + integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.15.0" - "@typescript-eslint/types" "8.15.0" - "@typescript-eslint/typescript-estree" "8.15.0" + "@typescript-eslint/scope-manager" "8.16.0" + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/typescript-estree" "8.16.0" -"@typescript-eslint/visitor-keys@8.15.0": - version "8.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz#9ea5a85eb25401d2aa74ec8a478af4e97899ea12" - integrity sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q== +"@typescript-eslint/visitor-keys@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz#d5086afc060b01ff7a4ecab8d49d13d5a7b07705" + integrity sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ== dependencies: - "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/types" "8.16.0" eslint-visitor-keys "^4.2.0" "@ungap/structured-clone@^1.2.0": @@ -1449,10 +1449,10 @@ cypress-plugin-api@^2.11.2: set-cookie-parser "^2.5.1" vue "^3.2.41" -cypress@^13.15.2: - version "13.15.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.15.2.tgz#ef19554c274bc4ff23802aeb5c52951677fa67f1" - integrity sha512-ARbnUorjcCM3XiPwgHKuqsyr5W9Qn+pIIBPaoilnoBkLdSC2oLQjV1BUpnmc7KR+b7Avah3Ly2RMFnfxr96E/A== +cypress@^13.16.0: + version "13.16.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.16.0.tgz#7674ca33941f9da58f15fd4e3456856d87730970" + integrity sha512-g6XcwqnvzXrqiBQR/5gN+QsyRmKRhls1y5E42fyOvsmU7JuY+wM6uHJWj4ZPttjabzbnRvxcik2WemR8+xT6FA== dependencies: "@cypress/request" "^3.0.6" "@cypress/xvfb" "^1.2.4" @@ -5165,10 +5165,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^5.6.3: - version "5.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" - integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== +typescript@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6"