diff --git a/.gitignore b/.gitignore index 2b290fecb..e02e81705 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,9 @@ web/sites/simpletest # Composer installs contrib recipes into 'recipes/', next to custom recipes, # so recipes stay an allow list: un-ignore custom recipes explicitly. recipes/* +#;< CONTENT_MODEL !recipes/page +#;> CONTENT_MODEL #;< AI_CODE_INSTRUCTIONS # Ignore all Claude files by default. Custom files should be added explicitly. diff --git a/.vortex/docs/content/architecture.mdx b/.vortex/docs/content/architecture.mdx index a179d8612..def135fa8 100644 --- a/.vortex/docs/content/architecture.mdx +++ b/.vortex/docs/content/architecture.mdx @@ -88,7 +88,7 @@ caches, and content files. Two sections stay as small allow lists because a deny rule cannot express them: - `recipes/` - Composer installs contributed recipes next to your custom ones, - so custom recipes are un-ignored explicitly (`!recipes/page`). + so each custom recipe is un-ignored explicitly. - `.claude/` - only `.claude/settings.json` is tracked by default. The other two ignore files apply the same deny-list model to different targets: diff --git a/.vortex/installer/src/Prompts/Handlers/CustomModules.php b/.vortex/installer/src/Prompts/Handlers/CustomModules.php index ed6feec55..95bed843a 100644 --- a/.vortex/installer/src/Prompts/Handlers/CustomModules.php +++ b/.vortex/installer/src/Prompts/Handlers/CustomModules.php @@ -182,6 +182,14 @@ public function process(): void { File::remove($path); } } + + // The 'page' content model is shared: the demo module attaches behaviour to + // the content type and the search tests index content of that type. It is + // only removed once neither of them remains. + if (!in_array(self::DEMO, $selected) && !in_array(self::SEARCH, $selected)) { + File::removeTokenAsync('CONTENT_MODEL'); + File::remove($t . '/recipes/page'); + } } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-00-enable-demo-modules.sh index 35000ef9c..9e6ef170f 100755 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/provision-00-enable-demo-modules.sh @@ -36,14 +36,16 @@ if ! echo "${environment}" | grep -qxF -e local -e ci -e dev -e stage; then exit 0 fi -# The demo site modules attach behaviour to the 'page' content type, so it -# must exist before those modules are installed and their deploy hooks run. +# Site modules attach behaviour to the 'page' content type, so it must exist +# before those modules are installed and their deploy hooks run. task "Creating the content model." # Guard against environments where the Drupal CLI is not available. if [ -x ./vendor/bin/dr ]; then ./vendor/bin/dr recipe "$(pwd)/recipes/page" --no-interaction + pass "Created the content model." +else + note "Skipped creating the content model: Drupal CLI is not available." fi -pass "Created the content model." task "Setting site name." drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'star wars')->save();" diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_base/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_base/scripts/provision-00-enable-demo-modules.sh index d525dc46a..2fd7c1f8a 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_base/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_base/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -82,7 +82,6 @@ +@@ -84,7 +84,6 @@ # Note that deployment hooks for already enabled modules have run in the # parent "provision.sh" script. task "Installing custom site modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_demo/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_demo/scripts/provision-00-enable-demo-modules.sh index aa70722f2..f9310788b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_demo/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_demo/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -86,7 +86,6 @@ +@@ -88,7 +88,6 @@ drush pm:install sw_search diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_search/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_search/scripts/provision-00-enable-demo-modules.sh index aa2194e8c..7002b6dff 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_search/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_no_search/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -84,8 +84,6 @@ +@@ -86,8 +86,6 @@ task "Installing custom site modules." drush pm:install sw_base diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/.gitignore b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/.gitignore new file mode 100644 index 000000000..4c478b1b2 --- /dev/null +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/.gitignore @@ -0,0 +1,8 @@ +@@ -32,7 +32,6 @@ + # Composer installs contrib recipes into 'recipes/', next to custom recipes, + # so recipes stay an allow list: un-ignore custom recipes explicitly. + recipes/* +-!recipes/page + + # Ignore all Claude files by default. Custom files should be added explicitly. + .claude/* diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/-recipe.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/-recipe.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-core.entity_form_display.node.page.default.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-core.entity_form_display.node.page.default.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-core.entity_view_display.node.page.default.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-core.entity_view_display.node.page.default.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-core.entity_view_display.node.page.teaser.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-core.entity_view_display.node.page.teaser.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-field.field.node.page.body.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-field.field.node.page.body.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-field.storage.node.body.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-field.storage.node.body.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-node.type.page.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/recipes/page/config/-node.type.page.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/scripts/provision-00-enable-demo-modules.sh index 18c38b8c5..dc9bed60b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_none/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,22 @@ -@@ -82,11 +82,7 @@ +@@ -36,17 +36,6 @@ + exit 0 + fi + +-# Site modules attach behaviour to the 'page' content type, so it must exist +-# before those modules are installed and their deploy hooks run. +-task "Creating the content model." +-# Guard against environments where the Drupal CLI is not available. +-if [ -x ./vendor/bin/dr ]; then +- ./vendor/bin/dr recipe "$(pwd)/recipes/page" --no-interaction +- pass "Created the content model." +-else +- note "Skipped creating the content model: Drupal CLI is not available." +-fi +- + task "Setting site name." + drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'star wars')->save();" + pass "Set site name." +@@ -84,11 +73,7 @@ # Note that deployment hooks for already enabled modules have run in the # parent "provision.sh" script. task "Installing custom site modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/scripts/provision-00-enable-demo-modules.sh index 8fb9c4a2e..1be342f82 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -73,10 +73,6 @@ +@@ -75,10 +75,6 @@ drush config-set clamav.settings mode_daemon_tcpip.hostname clamav pass "Installed and configured ClamAV." @@ -9,7 +9,7 @@ # Enable custom site module and run its deployment hooks. # # Note that deployment hooks for already enabled modules have run in the -@@ -83,8 +79,6 @@ +@@ -85,8 +81,6 @@ # parent "provision.sh" script. task "Installing custom site modules." drush pm:install sw_base diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/provision-00-enable-demo-modules.sh index dfcc68819..05541cdcf 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/provision-00-enable-demo-modules.sh index 9857ee02d..4965840a1 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/provision-00-enable-demo-modules.sh index c1250d1c3..fd2b6d8a6 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/provision-00-enable-demo-modules.sh index aa4e98b55..12e283d8b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/scripts/provision-00-enable-demo-modules.sh index 83900fa05..feb0a491c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_navigation_extra_tools/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/provision-00-enable-demo-modules.sh index 9138c9109..10650f41f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/provision-00-enable-demo-modules.sh index 54a06eb83..0fe47173c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/scripts/provision-00-enable-demo-modules.sh index baa18c322..8a5b116fe 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/provision-00-enable-demo-modules.sh index 2ece4a67c..3ef45f84c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh index ee668cff0..50eebbfe2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/provision-00-enable-demo-modules.sh index db1a6095b..d97ed9427 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh index 953073569..1e429d7ea 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/scripts/provision-00-enable-demo-modules.sh index 8f2c9993b..a396e188f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ pass "Set up the administration navigation." task "Installing contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/provision-00-enable-demo-modules.sh index 8cb7355b3..43a388bf8 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -60,10 +60,6 @@ +@@ -62,10 +62,6 @@ fi pass "Set up the administration navigation." diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/names/scripts/provision-00-enable-demo-modules.sh index 5958575bb..004acf6cf 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/names/scripts/provision-00-enable-demo-modules.sh @@ -1,5 +1,5 @@ -@@ -46,7 +46,7 @@ - pass "Created the content model." +@@ -48,7 +48,7 @@ + fi task "Setting site name." -drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'star wars')->save();" @@ -7,7 +7,7 @@ pass "Set site name." # Use the core Navigation module as the administration interface and remove -@@ -82,11 +82,11 @@ +@@ -84,11 +84,11 @@ # Note that deployment hooks for already enabled modules have run in the # parent "provision.sh" script. task "Installing custom site modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/provision-00-enable-demo-modules.sh index 900b3bc87..fd71160db 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -64,10 +64,6 @@ +@@ -66,10 +66,6 @@ drush pm:install coffee config_split config_update media environment_indicator navigation_extra_tools pathauto redirect reroute_email robotstxt shield stage_file_proxy xmlsitemap pass "Installed contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/scripts/provision-00-enable-demo-modules.sh index 99920b4dd..f03c80044 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -68,11 +68,6 @@ +@@ -70,11 +70,6 @@ drush pm:install redis || true pass "Installed Redis module." diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/scripts/provision-00-enable-demo-modules.sh index 99920b4dd..f03c80044 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -68,11 +68,6 @@ +@@ -70,11 +70,6 @@ drush pm:install redis || true pass "Installed Redis module." diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/provision-00-enable-demo-modules.sh index 900b3bc87..fd71160db 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -64,10 +64,6 @@ +@@ -66,10 +66,6 @@ drush pm:install coffee config_split config_update media environment_indicator navigation_extra_tools pathauto redirect reroute_email robotstxt shield stage_file_proxy xmlsitemap pass "Installed contrib modules." diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/scripts/provision-00-enable-demo-modules.sh index 8fb9c4a2e..1be342f82 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -73,10 +73,6 @@ +@@ -75,10 +75,6 @@ drush config-set clamav.settings mode_daemon_tcpip.hostname clamav pass "Installed and configured ClamAV." @@ -9,7 +9,7 @@ # Enable custom site module and run its deployment hooks. # # Note that deployment hooks for already enabled modules have run in the -@@ -83,8 +79,6 @@ +@@ -85,8 +81,6 @@ # parent "provision.sh" script. task "Installing custom site modules." drush pm:install sw_base diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_none/scripts/provision-00-enable-demo-modules.sh b/.vortex/installer/tests/Fixtures/handler_process/services_none/scripts/provision-00-enable-demo-modules.sh index be740471e..92edd12dd 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_none/scripts/provision-00-enable-demo-modules.sh +++ b/.vortex/installer/tests/Fixtures/handler_process/services_none/scripts/provision-00-enable-demo-modules.sh @@ -1,4 +1,4 @@ -@@ -64,19 +64,6 @@ +@@ -66,19 +66,6 @@ drush pm:install coffee config_split config_update media environment_indicator navigation_extra_tools pathauto redirect reroute_email robotstxt shield stage_file_proxy xmlsitemap pass "Installed contrib modules." @@ -18,7 +18,7 @@ # Enable custom site module and run its deployment hooks. # # Note that deployment hooks for already enabled modules have run in the -@@ -83,8 +70,6 @@ +@@ -85,8 +72,6 @@ # parent "provision.sh" script. task "Installing custom site modules." drush pm:install sw_base diff --git a/.vortex/installer/tests/Functional/Handlers/CustomModulesHandlerProcessTest.php b/.vortex/installer/tests/Functional/Handlers/CustomModulesHandlerProcessTest.php index 36d902db9..996900948 100644 --- a/.vortex/installer/tests/Functional/Handlers/CustomModulesHandlerProcessTest.php +++ b/.vortex/installer/tests/Functional/Handlers/CustomModulesHandlerProcessTest.php @@ -29,6 +29,7 @@ public static function dataProviderHandlerProcess(): \Iterator { static::cw(function (AbstractHandlerProcessTestCase $test): void { $test->assertSutNotContains('_demo'); $test->assertSutNotContains('counter_block'); + $test->assertDirectoryExists(static::$sut . '/recipes/page'); }), ]; yield 'custom_modules_no_search' => [ @@ -36,7 +37,10 @@ public static function dataProviderHandlerProcess(): \Iterator { $test->prompts[CustomModules::id()] = [CustomModules::BASE, CustomModules::DEMO]; $test->prompts[AiCodeInstructions::id()] = TRUE; }), - static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('_search')), + static::cw(function (AbstractHandlerProcessTestCase $test): void { + $test->assertSutNotContains('_search'); + $test->assertDirectoryExists(static::$sut . '/recipes/page'); + }), ]; yield 'custom_modules_none' => [ static::cw(fn($test): array => $test->prompts[CustomModules::id()] = []), @@ -44,6 +48,7 @@ public static function dataProviderHandlerProcess(): \Iterator { $test->assertSutNotContains('_base'); $test->assertSutNotContains('_demo'); $test->assertSutNotContains('_search'); + $test->assertDirectoryDoesNotExist(static::$sut . '/recipes/page'); }), ]; yield 'custom_modules_search_without_solr' => [ @@ -54,7 +59,10 @@ public static function dataProviderHandlerProcess(): \Iterator { $test->prompts[Services::id()] = [Services::CLAMAV, Services::REDIS]; $test->prompts[AiCodeInstructions::id()] = TRUE; }), - static::cw(fn(FunctionalTestCase $test) => $test->assertSutNotContains('_search')), + static::cw(function (AbstractHandlerProcessTestCase $test): void { + $test->assertSutNotContains('_search'); + $test->assertDirectoryExists(static::$sut . '/recipes/page'); + }), ]; } diff --git a/scripts/provision-00-enable-demo-modules.sh b/scripts/provision-00-enable-demo-modules.sh index 03248cbad..ff4e58b85 100755 --- a/scripts/provision-00-enable-demo-modules.sh +++ b/scripts/provision-00-enable-demo-modules.sh @@ -36,14 +36,18 @@ if ! echo "${environment}" | grep -qxF -e local -e ci -e dev -e stage; then exit 0 fi -# The demo site modules attach behaviour to the 'page' content type, so it -# must exist before those modules are installed and their deploy hooks run. +#;< CONTENT_MODEL +# Site modules attach behaviour to the 'page' content type, so it must exist +# before those modules are installed and their deploy hooks run. task "Creating the content model." # Guard against environments where the Drupal CLI is not available. if [ -x ./vendor/bin/dr ]; then ./vendor/bin/dr recipe "$(pwd)/recipes/page" --no-interaction + pass "Created the content model." +else + note "Skipped creating the content model: Drupal CLI is not available." fi -pass "Created the content model." +#;> CONTENT_MODEL task "Setting site name." drush php:eval "\Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"