[
  {
    "path": ".ddev/commands/host/exec_dir",
    "content": "#!/bin/bash\n\n## Description: Run programs in container, based on current host directory\n## Usage: exec_d [args]\n## Example: \"ddev exec_d yarn\"\n\nif [ -z \"$1\" ]; then\n  echo \"No argument supplied\"\n  exit 1\nfi\n\nddev exec -d /var/www/html/\"$(echo \"$PWD\" | cut -d'/' -f4-)\" \"$@\"\n"
  },
  {
    "path": ".ddev/commands/web/nightwatch",
    "content": "#!/bin/bash\n\n## Description: Run Nightwatch\n## Usage: nightwatch [flags] [args]\n## Example: \"ddev nightwatch\" or \"ddev nightwatch --tag core\"\n\n# Installs dependencies if not already run.\nif [ ! -d /var/www/html/web/core/node_modules ]; then\n  yarn --cwd /var/www/html/web/core install\nfi\n\nyarn --cwd /var/www/html/web/core test:nightwatch $@\n\n"
  },
  {
    "path": ".ddev/commands/web/phpunit",
    "content": "#!/bin/bash\n\n## Description: Run PHPUnit\n## Usage: phpunit [flags] [args]\n## Example: \"ddev phpunit --group big_pipe\" or \"ddev phpunit core/modules/action\"\n\nmkdir -p /var/www/html/web/sites/simpletest/browser_output\n\ncd web\n\nBROWSERTEST_OUTPUT_DIRECTORY=/var/www/html/web/sites/simpletest/browser_output \\\nBROWSERTEST_OUTPUT_BASE_URL=http://localhost:8080 \\\nSIMPLETEST_DB=\"mysql://db:db@db/db\" \\\nSIMPLETEST_BASE_URL=\"http://localhost\" \\\nphp ../vendor/bin/phpunit -c core/phpunit.xml.dist $@\n"
  },
  {
    "path": ".ddev/config.yaml",
    "content": "name: DrupalPod\ntype: drupal\ndocroot: web\nphp_version: \"8.3\"\nwebserver_type: nginx-fpm\nxdebug_enabled: false\nadditional_hostnames: []\nadditional_fqdns: []\ndatabase:\n    type: mariadb\n    version: \"10.6\"\nuse_dns_when_possible: true\ncomposer_version: \"2\"\nweb_environment: []\ncorepack_enable: false\n\n# Key features of DDEV's config.yaml:\n\n# name: <projectname> # Name of the project, automatically provides\n#   http://projectname.ddev.site and https://projectname.ddev.site\n\n# type: <projecttype>  # backdrop, cakephp, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress\n# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more\n# information on the different project types\n\n# docroot: <relative_path> # Relative path to the directory containing index.php.\n\n# php_version: \"8.3\"  # PHP version to use, \"5.6\" through \"8.4\"\n\n# You can explicitly specify the webimage but this\n# is not recommended, as the images are often closely tied to DDEV's' behavior,\n# so this can break upgrades.\n\n# webimage: <docker_image>  # nginx/php docker image.\n\n# database:\n#   type: <dbtype> # mysql, mariadb, postgres\n#   version: <version> # database version, like \"10.11\" or \"8.0\"\n#   MariaDB versions can be 5.5-10.8, 10.11, and 11.4.\n#   MySQL versions can be 5.5-8.0.\n#   PostgreSQL versions can be 9-17.\n\n# router_http_port: <port>  # Port to be used for http (defaults to global configuration, usually 80)\n# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)\n\n# xdebug_enabled: false  # Set to true to enable Xdebug and \"ddev start\" or \"ddev restart\"\n# Note that for most people the commands\n# \"ddev xdebug\" to enable Xdebug and \"ddev xdebug off\" to disable it work better,\n# as leaving Xdebug enabled all the time is a big performance hit.\n\n# xhprof_enabled: false  # Set to true to enable Xhprof and \"ddev start\" or \"ddev restart\"\n# Note that for most people the commands\n# \"ddev xhprof\" to enable Xhprof and \"ddev xhprof off\" to disable it work better,\n# as leaving Xhprof enabled all the time is a big performance hit.\n\n# webserver_type: nginx-fpm, apache-fpm, generic\n\n# timezone: Europe/Berlin\n# If timezone is unset, DDEV will attempt to derive it from the host system timezone\n# using the $TZ environment variable or the /etc/localtime symlink.\n# This is the timezone used in the containers and by PHP;\n# it can be set to any valid timezone,\n# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n# For example Europe/Dublin or MST7MDT\n\n# composer_root: <relative_path>\n# Relative path to the Composer root directory from the project root. This is\n# the directory which contains the composer.json and where all Composer related\n# commands are executed.\n\n# composer_version: \"2\"\n# You can set it to \"\" or \"2\" (default) for Composer v2 or \"1\" for Composer v1\n# to use the latest major version available at the time your container is built.\n# It is also possible to use each other Composer version channel. This includes:\n#   - 2.2 (latest Composer LTS version)\n#   - stable\n#   - preview\n#   - snapshot\n# Alternatively, an explicit Composer version may be specified, for example \"2.2.18\".\n# To reinstall Composer after the image was built, run \"ddev debug rebuild\".\n\n# nodejs_version: \"22\"\n# change from the default system Node.js version to any other version.\n# See https://ddev.readthedocs.io/en/stable/users/configuration/config/#nodejs_version for more information\n# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation,\n# Note that using of 'ddev nvm' is discouraged because \"nodejs_version\" is much easier to use,\n# can specify any version, and is more robust than using 'nvm'.\n\n# corepack_enable: false\n# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm\n\n# additional_hostnames:\n#  - somename\n#  - someothername\n# would provide http and https URLs for \"somename.ddev.site\"\n# and \"someothername.ddev.site\".\n\n# additional_fqdns:\n#  - example.com\n#  - sub1.example.com\n# would provide http and https URLs for \"example.com\" and \"sub1.example.com\"\n# Please take care with this because it can cause great confusion.\n\n# upload_dirs: \"custom/upload/dir\"\n#\n# upload_dirs:\n#   - custom/upload/dir\n#   - ../private\n#\n# would set the destination paths for ddev import-files to <docroot>/custom/upload/dir\n# When Mutagen is enabled this path is bind-mounted so that all the files\n# in the upload_dirs don't have to be synced into Mutagen.\n\n# disable_upload_dirs_warning: false\n# If true, turns off the normal warning that says\n# \"You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set\"\n\n# ddev_version_constraint: \"\"\n# Example:\n# ddev_version_constraint: \">= 1.22.4\"\n# This will enforce that the running ddev version is within this constraint.\n# See https://github.com/Masterminds/semver#checking-version-constraints for\n# supported constraint formats\n\n# working_dir:\n#   web: /var/www/html\n#   db: /home\n# would set the default working directory for the web and db services.\n# These values specify the destination directory for ddev ssh and the\n# directory in which commands passed into ddev exec are run.\n\n# omit_containers: [db, ddev-ssh-agent]\n# Currently only these containers are supported. Some containers can also be\n# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit\n# the \"db\" container, several standard features of DDEV that access the\n# database container will be unusable. In the global configuration it is also\n# possible to omit ddev-router, but not here.\n\n# performance_mode: \"global\"\n# DDEV offers performance optimization strategies to improve the filesystem\n# performance depending on your host system. Should be configured globally.\n#\n# If set, will override the global config. Possible values are:\n#   - \"global\":  uses the value from the global config.\n#   - \"none\":    disables performance optimization for this project.\n#   - \"mutagen\": enables Mutagen for this project.\n#   - \"nfs\":     enables NFS for this project.\n#\n# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs\n# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen\n\n# fail_on_hook_fail: False\n# Decide whether 'ddev start' should be interrupted by a failing hook\n\n# host_https_port: \"59002\"\n# The host port binding for https can be explicitly specified. It is\n# dynamic unless otherwise specified.\n# This is not used by most people, most people use the *router* instead\n# of the localhost port.\n\n# host_webserver_port: \"59001\"\n# The host port binding for the ddev-webserver can be explicitly specified. It is\n# dynamic unless otherwise specified.\n# This is not used by most people, most people use the *router* instead\n# of the localhost port.\n\n# host_db_port: \"59002\"\n# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic\n# unless explicitly specified.\n\n# mailpit_http_port: \"8025\"\n# mailpit_https_port: \"8026\"\n# The Mailpit ports can be changed from the default 8025 and 8026\n\n# host_mailpit_port: \"8025\"\n# The mailpit port is not normally bound on the host at all, instead being routed\n# through ddev-router, but it can be bound directly to localhost if specified here.\n\n# webimage_extra_packages: [php7.4-tidy, php-bcmath]\n# Extra Debian packages that are needed in the webimage can be added here\n\n# dbimage_extra_packages: [telnet,netcat]\n# Extra Debian packages that are needed in the dbimage can be added here\n\n# use_dns_when_possible: true\n# If the host has internet access and the domain configured can\n# successfully be looked up, DNS will be used for hostname resolution\n# instead of editing /etc/hosts\n# Defaults to true\n\n# project_tld: ddev.site\n# The top-level domain used for project URLs\n# The default \"ddev.site\" allows DNS lookup via a wildcard\n# If you prefer you can change this to \"ddev.local\" to preserve\n# pre-v1.9 behavior.\n\n# ngrok_args: --basic-auth username:pass1234\n# Provide extra flags to the \"ngrok http\" command, see\n# https://ngrok.com/docs/ngrok-agent/config or run \"ngrok http -h\"\n\n# disable_settings_management: false\n# If true, DDEV will not create CMS-specific settings files like\n# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php\n# In this case the user must provide all such settings.\n\n# You can inject environment variables into the web container with:\n# web_environment:\n#     - SOMEENV=somevalue\n#     - SOMEOTHERENV=someothervalue\n\n# no_project_mount: false\n# (Experimental) If true, DDEV will not mount the project into the web container;\n# the user is responsible for mounting it manually or via a script.\n# This is to enable experimentation with alternate file mounting strategies.\n# For advanced users only!\n\n# bind_all_interfaces: false\n# If true, host ports will be bound on all network interfaces,\n# not the localhost interface only. This means that ports\n# will be available on the local network if the host firewall\n# allows it.\n\n# default_container_timeout: 120\n# The default time that DDEV waits for all containers to become ready can be increased from\n# the default 120. This helps in importing huge databases, for example.\n\n#web_extra_exposed_ports:\n#- name: nodejs\n#  container_port: 3000\n#  http_port: 2999\n#  https_port: 3000\n#- name: something\n#  container_port: 4000\n#  https_port: 4000\n#  http_port: 3999\n# Allows a set of extra ports to be exposed via ddev-router\n# Fill in all three fields even if you don’t intend to use the https_port!\n# If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start.\n#\n# The port behavior on the ddev-webserver must be arranged separately, for example\n# using web_extra_daemons.\n# For example, with a web app on port 3000 inside the container, this config would\n# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998\n# web_extra_exposed_ports:\n#  - name: myapp\n#    container_port: 3000\n#    http_port: 9998\n#    https_port: 9999\n\n#web_extra_daemons:\n#- name: \"http-1\"\n#  command: \"/var/www/html/node_modules/.bin/http-server -p 3000\"\n#  directory: /var/www/html\n#- name: \"http-2\"\n#  command: \"/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000\"\n#  directory: /var/www/html\n\n# override_config: false\n# By default, config.*.yaml files are *merged* into the configuration\n# But this means that some things can't be overridden\n# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge\n# and you can't erase existing hooks or all environment variables.\n# However, with \"override_config: true\" in a particular config.*.yaml file,\n# 'use_dns_when_possible: false' can override the existing values, and\n# hooks:\n#   post-start: []\n# or\n# web_environment: []\n# or\n# additional_hostnames: []\n# can have their intended affect. 'override_config' affects only behavior of the\n# config.*.yaml file it exists in.\n\n# Many DDEV commands can be extended to run tasks before or after the\n# DDEV command is executed, for example \"post-start\", \"post-import-db\",\n# \"pre-composer\", \"post-composer\"\n# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more\n# information on the commands that can be extended and the tasks you can define\n# for them. Example:\n#hooks:\n# post-import-db:\n#   - exec: drush sql:sanitize\n#   - exec: drush updatedb\n#   - exec: drush cache:rebuild\n"
  },
  {
    "path": ".ddev/docker-compose.ports.yaml",
    "content": "# Expose port 3000 and 5000 of DDEV's web container.\nservices:\n  web:\n    # ports are a list of exposed *container* ports\n    ports:\n      - 3000:3000\n      - 5000:5000\n"
  },
  {
    "path": ".ddev/docker-compose.testing.yaml",
    "content": "---\n# Adds Chromedriver and Drupal PHPUnit test environment variables for running tests.\nservices:\n  chromedriver:\n    image: drupalci/chromedriver:production\n    container_name: ddev-${DDEV_SITENAME}-chromedriver\n    networks: [default, ddev_default]\n    labels:\n      com.ddev.site-name: ${DDEV_SITENAME}\n      com.ddev.approot: $DDEV_APPROOT\n\n  web:\n    links:\n      - chromedriver:$DDEV_HOSTNAME\n    environment:\n      # PHPUnit\n      SYMFONY_DEPRECATIONS_HELPER: weak\n      SIMPLETEST_DB: mysql://db:db@db:3306/db\n      SIMPLETEST_BASE_URL: http://localhost\n      BROWSERTEST_OUTPUT_DIRECTORY: /var/www/html/private/browsertest_output\n      BROWSERTEST_OUTPUT_BASE_URL: $DDEV_PRIMARY_URL\n      MINK_DRIVER_ARGS_WEBDRIVER: '[\"chrome\", {\"browserName\":\"chrome\",\"chromeOptions\":{\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\"]}}, \"http://chromedriver:9515\"]'\n\n      # Nightwatch\n      DRUPAL_TEST_BASE_URL: http://web\n      DRUPAL_TEST_DB_URL: mysql://db:db@db:3306/db\n      DRUPAL_TEST_WEBDRIVER_HOSTNAME: chromedriver\n      DRUPAL_TEST_WEBDRIVER_PORT: 9515\n      DRUPAL_TEST_CHROMEDRIVER_AUTOSTART: 'false'\n      DRUPAL_TEST_WEBDRIVER_CHROME_ARGS: \"--disable-gpu --headless --no-sandbox\"\n      DRUPAL_NIGHTWATCH_OUTPUT: reports/nightwatch\n      DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES: node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: shaal\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n## Describe the bug\n\n<!--\nA clear and concise description of what the bug is.\n-->\n\n## To Reproduce\n\n<!--\nSteps to reproduce the behavior:\n-->\n\n## Expected behavior\n\n<!--\nA clear and concise description of what you expected to happen.\n-->\n\n## Screenshots\n\n<!--\nIf applicable, add screenshots to help explain your problem.\n-->\n\n### Version and configuration information (please complete the following information)\n\n- **Issue page** <!-- ie. https://www.drupal.org/project/feeds/issues/3206365 -->\n- **Issue branch** <!-- ie. feeds-3206365 -->\n- **Drupal core version** <!-- ie. 9.3.x / 9.2.0 / etc -->\n- **Project type**\n- [ ] Core\n- [ ] Module\n- [ ] Theme\n\n## Additional context\n\n<!--\nAdd any other context about the problem here. Thanks!\n-->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n## Is your feature request related to a problem? Please describe\n<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->\n\n## Describe the solution you'd like\n<!-- A clear and concise description of what you want to happen. -->\n\n## Describe alternatives you've considered\n<!-- A clear and concise description of any alternative solutions or features you've considered. -->\n\n## Additional context\n<!-- Add any other context or screenshots about the feature request here. -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Support_request.md",
    "content": "---\nname: Support Request\nabout: Get help with a problem\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n## Describe the problem\n\n<!--\nPlease explain exactly what the problem is.\n-->\n\n## To Reproduce\n\n<!--\nPlease describe step-by-step exactly how to recreate the problem you're having.\n-->\n\n## Expected behavior\n\n<!--\nA clear and concise description of what you expected to happen.\n-->\n\n## Screenshots\n\n<!--\nIf applicable, add screenshots to help explain your problem.\n-->\n\n### Version and configuration information (please complete the following information)\n\n- **Issue page** <!-- ie. https://www.drupal.org/project/feeds/issues/3206365 -->\n- **Issue branch** <!-- ie. feeds-3206365 -->\n- **Drupal core version** <!-- ie. 9.3.x / 9.2.0 / etc -->\n- **Project type**\n- [ ] Core\n- [ ] Module\n- [ ] Theme\n\n## Additional context\n\n<!--\nAdd any other context about the problem here. Thanks!\n-->\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "# The Problem/Issue/Bug\n\n## How this PR Solves The Problem\n\n## Manual Testing Instructions\n\n## Related Issue Link(s)\n\n## Release/Deployment notes\n<!-- Does this affect anything else, or are there ramifications for other code? Does anything have to be done on deployment? -->\n"
  },
  {
    "path": ".github/RELEASE_NOTES_TEMPLATE.md",
    "content": "# Key changes in _VERSION_:\n\n*\n\n# Commits since _PREVIOUS VERSION_\n\n\n# Caveats\n"
  },
  {
    "path": ".github/move.yml",
    "content": "# Configuration for move-issues - https://github.com/dessant/move-issues\n\n# Delete the command comment when it contains no other content\ndeleteCommand: true\n\n# Close the source issue after moving\ncloseSourceIssue: true\n\n# Lock the source issue after moving\nlockSourceIssue: false\n\n# Mention issue and comment authors\nmentionAuthors: true\n\n# Preserve mentions in the issue content\nkeepContentMentions: false\n\n# Set custom aliases for targets\n# aliases:\n#   r: repo\n#   or: owner/repo\n"
  },
  {
    "path": ".github/workflows/codesee-arch-diagram.yml",
    "content": "# This workflow was added by CodeSee. Learn more at https://codesee.io/\n# This is v2.0 of this workflow file\non:\n  push:\n    branches:\n      - main\n  pull_request_target:\n    types: [opened, synchronize, reopened]\n\nname: CodeSee\n\npermissions: read-all\n\njobs:\n  codesee:\n    runs-on: ubuntu-latest\n    continue-on-error: true\n    name: Analyze the repo with CodeSee\n    steps:\n      - uses: Codesee-io/codesee-action@v2\n        with:\n          codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/mirror.yml",
    "content": "# This mirrors daily from an upstream repository.\r\n# These two things must be set:\r\n# UPSTREAM_REPO should be set to something like\r\n# https://git.drupalcode.org/issue/drupalpod-3474581.git\r\n# WORKFLOW_TOKEN is a secret in the \"normal\" environment containing\r\n# a fine-grained PAT with permissions to read/write content and read/write workflows\r\n\r\nname: Mirror from Upstream\r\ndefaults:\r\n  run:\r\n    shell: bash\r\non:\r\n  schedule:\r\n    - cron: '0 0 * * *'  # Runs daily at midnight UTC\r\n  workflow_dispatch:     # Allows manual triggering of the workflow\r\n\r\npermissions:\r\n  contents: write\r\n\r\njobs:\r\n  mirror:\r\n    runs-on: ubuntu-latest\r\n    env:\r\n      CLONEDIR: \"/tmp/clonedir\"\r\n    # The environment variables will be in the environment \"normal\"\r\n    environment: \"normal\"\r\n\r\n    steps:\r\n      - name: Set up Git environment\r\n        run: |\r\n          git config --global user.name \"GitHub Action\"\r\n          git config --global user.email \"action@github.com\"\r\n\r\n      - name: Clone upstream repository\r\n        run: |\r\n          set -x\r\n          set -eu -o pipefail\r\n          mkdir -p ${CLONEDIR}\r\n          # The variable UPSTREAM_REPO must be set in the repository's\r\n          # \"normal\" environment\r\n          git clone --mirror \"${{ vars.UPSTREAM_REPO }}\" \"${{ env.CLONEDIR }}\"\r\n\r\n      - name: Remove existing Git credentials\r\n        run: |\r\n          git config --global --unset-all http.https://github.com/.extraheader || true\r\n\r\n      - name: Push to GitHub\r\n        env:\r\n          # The WORKFLOW_TOKEN is a fine-grained PAT with\r\n          # contents: read-write and\r\n          # workflow:read/write perm for this repo\r\n          WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}\r\n          REPO: ${{ github.repository }}\r\n\r\n        run: |\r\n          set -x\r\n          cd ${{ env.CLONEDIR }}\r\n          git remote set-url origin \"https://github.com/${REPO}.git\"\r\n          git config --global user.name \"GitHub Action\"\r\n          git config --global user.email \"action@github.com\"\r\n          git remote set-url origin \"https://x-access-token:${WORKFLOW_TOKEN}@github.com/${REPO}.git\"\r\n          git push --mirror\r\n\r\n          \r\n"
  },
  {
    "path": ".github/workflows/vscode-extension.build.yml",
    "content": "name: Test VSCode Extension\non:\n  - push\n  - pull_request\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      -\n        uses: actions/checkout@v2\n      -\n        uses: actions/setup-node@v2\n        with:\n          node-version: 14.x\n          # @todo https://github.com/actions/setup-node/pull/299\n          # cache: true\n      -\n        run: yarn install\n        working-directory: ./src/vscode-extension/drupalpod-ext\n      # @todo run tests when \"vscode-test\" package works in GitPod and/or Actions.\n      # -\n      #  run: yarn test\n      #  working-directory: ./src/vscode-extension/drupalpod-ext\n      -\n        run: yarn package\n        working-directory: ./src/vscode-extension/drupalpod-ext\n"
  },
  {
    "path": ".github/workflows/vscode-extension.release.yml",
    "content": "name: Publish VSCode Extension\non:\n  release:\n    types: [published]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      -\n        uses: actions/checkout@v2\n      -\n        uses: actions/setup-node@v2\n        with:\n          node-version: 14.x\n          # @todo https://github.com/actions/setup-node/pull/299\n          # cache: 'yarn'\n      -\n        run: yarn install\n        working-directory: ./src/vscode-extension/drupalpod-ext\n      # @todo bump the version with each DrupalPod release automatically?\n      #   This will mean the release doesn't have the new version in repos?\n      # -\n      #  run: yarn version --new-version ${{ github.event.release.tag_name }}\n      #  working-directory: ./src/vscode-extension/drupalpod-ext\n      #-\n      #  run: git push origin\n      -\n        run: npm run ovsx publish -p ${{ secrets.OVSX_TOKEN }}\n        working-directory: ./src/vscode-extension/drupalpod-ext\n"
  },
  {
    "path": ".gitignore",
    "content": "# Drupal\n/web/\n/vendor/\ncomposer.json\ncomposer.lock\n.editorconfig\n.gitattributes\n\n# DrupalPod\n.drupalpod_initiated\n.gitmodules\nrepos/\nsrc/**/node_modules/\nsrc/**/package-lock.json\nsrc/**/out/\nsrc/**/*.vsix\nsrc/**/.vscode-test/\ndrush/\n.ddev/config.gitpod.yaml\n"
  },
  {
    "path": ".gitpod/README.md",
    "content": "# Setting up a new version for DrupalPod\n\n## Build custom Gitpod image\n\n1. Update `.gitpod/images/Dockerfile`:\n\n    1. Update `ddev` latest version.\n    1. Update `minio` latest version.\n    1. Update `gitui` latest version.\n    1. Update `lazygit` latest version.\n\n1. Generate new custom docker image:\n\n    1. Run `docker login` to authenticate and push new images to docker hub.\n    1. In `/.gitpod/images` run `./push.sh` command to build and push the new custom docker image.\n    1. Confirm the process run without errors and that the new custom image gets uploaded to <https://hub.docker.com/r/drupalpod/drupalpod-gitpod-base/tags>.\n    1. Update `/.gitpod.yml` with the new image file.\n\n1. Push code, and re-open Gitpod workspace, to use latest custom docker image.\n\n1. Run manual prebuild (to load ddev's images)\n\n1. Confirm latest setup\n    1. Open new workspace.\n    1. Check if there are any updates (ie. DDEV's default settings files).\n\n1. Test various scenarios with DrupalPod browser extension\n    1. Confirm core issues work as expected.\n    1. Confirm contrib issue work as expected.\n\n1. Merge PR into `main` branch\n\n1. Confirm `main` branch work as expected 🎉\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/cleanup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Remove site that was installed before (for debugging)\nrm -rf \"${GITPOD_REPO_ROOT}\"/web\nrm -rf \"${GITPOD_REPO_ROOT}\"/vendor\nrm -f \"${GITPOD_REPO_ROOT}\"/composer.json\nrm -f \"${GITPOD_REPO_ROOT}\"/composer.lock\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/composer_setup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# For versions end with x - add `-dev` suffix (ie. 9.3.x-dev)\n# For versions without x - add `~` prefix (ie. ~9.2.0)\nd=\"$DP_CORE_VERSION\"\ncase $d in\n*.x)\n    install_version=\"$d\"-dev\n    ;;\n*)\n    install_version=~\"$d\"\n    ;;\nesac\n\n# Create required composer.json and composer.lock files\ncd \"$GITPOD_REPO_ROOT\" && time ddev . composer create -n --no-install drupal/recommended-project:\"$install_version\" temp-composer-files\ncp \"$GITPOD_REPO_ROOT\"/temp-composer-files/* \"$GITPOD_REPO_ROOT\"/.\nrm -rf \"$GITPOD_REPO_ROOT\"/temp-composer-files\n\n# Programmatically fix Composer 2.2 allow-plugins to avoid errors\nddev composer config --no-plugins allow-plugins.composer/installers true\nddev composer config --no-plugins allow-plugins.drupal/core-project-message true\nddev composer config --no-plugins allow-plugins.drupal/core-vendor-hardening true\nddev composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true\n\nddev composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true\nddev composer config --no-plugins allow-plugins.phpstan/extension-installer true\n\nddev composer config --no-plugins allow-plugins.mglaman/composer-drupal-lenient true\n\nddev composer config --no-plugins allow-plugins.php-http/discovery true\n\nddev composer config --no-plugins allow-plugins.tbachert/spi true\n\n# Add project source code as symlink (to repos/name_of_project)\n# double quotes explained - https://stackoverflow.com/a/1250279/5754049\nif [ -n \"$DP_PROJECT_NAME\" ]; then\n    cd \"${GITPOD_REPO_ROOT}\" &&\n        ddev composer config \\\n            repositories.core1 \\\n            '{\"type\": \"path\", \"url\": \"repos/'\"$DP_PROJECT_NAME\"'\", \"options\": {\"symlink\": true}}'\n\n    cd \"$GITPOD_REPO_ROOT\" &&\n        ddev composer config minimum-stability dev\nfi\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/contrib_modules_setup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Check if additional modules should be installed\nexport DEVEL_NAME=\"devel\"\nexport DEVEL_PACKAGE=\"drupal/devel\"\n\nexport ADMIN_TOOLBAR_NAME=\"admin_toolbar_tools\"\nexport ADMIN_TOOLBAR_PACKAGE=\"drupal/admin_toolbar\"\n\n# TODO: once Drupalpod extension supports additional modules - remove these 2 lines\nexport DP_EXTRA_DEVEL=1\nexport DP_EXTRA_ADMIN_TOOLBAR=1\n\n# Adding support for composer-drupal-lenient - https://packagist.org/packages/mglaman/composer-drupal-lenient\nif [[ \"$DP_CORE_VERSION\" =~ ^10(\\..*)?$ ]]; then\n    if [ \"$DP_PROJECT_TYPE\" != \"project_core\" ]; then\n        export COMPOSER_DRUPAL_LENIENT=mglaman/composer-drupal-lenient\n    else\n        export COMPOSER_DRUPAL_LENIENT=''\n    fi\nfi\n\n# Adding support for composer-drupal-lenient - https://packagist.org/packages/mglaman/composer-drupal-lenient\nif [[ \"$DP_CORE_VERSION\" =~ ^11(\\..*)?$ ]]; then\n    # admin_toolbar and devel are not compatible yet with Drupal 11\n    export DP_EXTRA_ADMIN_TOOLBAR=\n    export DP_EXTRA_DEVEL=\n    if [ \"$DP_PROJECT_TYPE\" != \"project_core\" ]; then\n        export COMPOSER_DRUPAL_LENIENT=mglaman/composer-drupal-lenient\n    else\n        export COMPOSER_DRUPAL_LENIENT=''\n    fi\nfi\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/ddev_setup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# set PHP version, based on https://www.drupal.org/docs/getting-started/system-requirements/php-requirements#versions\nmajor_version=$(echo \"$DP_CORE_VERSION\" | cut -d '.' -f 1)\nminor_version=$(echo \"$DP_CORE_VERSION\" | cut -d '.' -f 2)\n\n# Before Drupal 10.2, we should use php 8.2, otherwise use php 8.3\nif (( major_version < 10 )) || { (( major_version == 10 )) && (( minor_version < 2 )); }; then\n    php_version=\"8.2\"\nelse\n    php_version=\"8.3\"\nfi\n\ncat <<CONFIGEND > \"${GITPOD_REPO_ROOT}\"/.ddev/config.gitpod.yaml\n#ddev-gitpod-generated\nphp_version: \"$php_version\"\nCONFIGEND\n\ntime ddev start\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/drupal_setup_contrib.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Drupal projects with no composer.json, bypass the symlink config, symlink has to be created manually.\n\nif [ \"$DP_PROJECT_TYPE\" == \"project_module\" ]; then\n    PROJECT_TYPE=modules\nelif [ \"$DP_PROJECT_TYPE\" == \"project_theme\" ]; then\n    PROJECT_TYPE=themes\nfi\n\ncat <<PROJECTASYMLINK >\"${GITPOD_REPO_ROOT}\"/repos/add-project-as-symlink.sh\n#!/usr/bin/env bash\n# This file was dynamically generated by a script\necho \"Replace project with a symlink\"\nrm -rf web/$PROJECT_TYPE/contrib/$DP_PROJECT_NAME\ncd web/$PROJECT_TYPE/contrib && ln -s ../../../repos/$DP_PROJECT_NAME .\nPROJECTASYMLINK\n\nchmod +x \"${GITPOD_REPO_ROOT}\"/repos/add-project-as-symlink.sh\n\nif [ -n \"$COMPOSER_DRUPAL_LENIENT\" ]; then\n    # Add composer_drupal_lenient for modules on Drupal 10\n    cd \"${GITPOD_REPO_ROOT}\" && ddev composer config --merge --json extra.drupal-lenient.allowed-list '[\"drupal/'\"$DP_PROJECT_NAME\"'\"]'\n    cd \"${GITPOD_REPO_ROOT}\" && time ddev . composer require \"$COMPOSER_DRUPAL_LENIENT\" --no-install\nfi\n# Add the project to composer (it will get the version according to the branch under `/repo/name_of_project`)\ncd \"${GITPOD_REPO_ROOT}\" && time ddev . composer require drupal/\"$DP_PROJECT_NAME\" --no-interaction --no-install\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/drupal_setup_core.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Add a special path when working on core contributions\n# (Without it, /web/modules/contrib is not found by website)\ncd \"${GITPOD_REPO_ROOT}\" &&\n    ddev composer config \\\n        repositories.drupal-core2 \\\n        '{\"type\": \"path\", \"url\": \"repos/drupal/core\"}'\n\ncd \"${GITPOD_REPO_ROOT}\" &&\n    ddev composer config \\\n        repositories.drupal-core3 \\\n        '{\"type\": \"path\", \"url\": \"repos/drupal/composer/Metapackage/CoreRecommended\"}'\n\ncd \"${GITPOD_REPO_ROOT}\" &&\n    ddev composer config \\\n        repositories.drupal-core4 \\\n        '{\"type\": \"path\", \"url\": \"repos/drupal/composer/Metapackage/DevDependencies\"}'\n\ncd \"${GITPOD_REPO_ROOT}\" &&\n    ddev composer config \\\n        repositories.drupal-core5 \\\n        '{\"type\": \"path\", \"url\": \"repos/drupal/composer/Plugin/ProjectMessage\"}'\n\ncd \"${GITPOD_REPO_ROOT}\" &&\n    ddev composer config \\\n        repositories.drupal-core6 \\\n        '{\"type\": \"path\", \"url\": \"repos/drupal/composer/Plugin/VendorHardening\"}'\n\n# Removing the conflict part of composer\necho \"$(cat composer.json | jq 'del(.conflict)' --indent 4)\" >composer.json\n\n# If a core issue branch was chosen, we want the version of Drupal core that is in that issue branch\n# This is very helpful for issues that started with previous Drupal core versions, and the issue version automatically got updated to latest current drupal version\nif [ \"$DP_PROJECT_TYPE\" == \"project_core\" ] && [ -n \"$DP_ISSUE_BRANCH\" ]; then\n    time composer require drupal/core-recommended:* drupal/core-project-message:* drupal/core-composer-scaffold:* --no-update\nfi\n\n# Only after composer update, /web/core get symlinked to /repos/drupal/core\n# repos/drupal/core -> web/core\ntime composer update\n\n# vendor -> repos/drupal/vendor\nif [ ! -L \"$GITPOD_REPO_ROOT\"/repos/drupal/vendor ]; then\n    cd \"$GITPOD_REPO_ROOT\"/repos/drupal &&\n        ln -s ../../vendor .\nfi\n\n# Create folders for running tests\nmkdir -p \"$GITPOD_REPO_ROOT\"/web/sites/simpletest\nmkdir -p \"$GITPOD_REPO_ROOT\"/web/sites/simpletest/browser_output\n\n# Symlink the simpletest folder into the Drupal core git repo.\n# repos/drupal/sites/simpletest -> ../../../web/sites/simpletest\nif [ ! -L \"$GITPOD_REPO_ROOT\"/repos/drupal/sites/simpletest ]; then\n    cd \"$GITPOD_REPO_ROOT\"/repos/drupal/sites &&\n        ln -s ../../../web/sites/simpletest .\nfi\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/drupalpod-setup.md",
    "content": "# File Structure\n\nThe drupalpod-setup.sh script can be divided into several logical sections based on the tasks it performs. Here are some potential divisions:\n\n1. Environment Setup: This section sets up the environment variables and checks for certain conditions. It includes the loading of default environment variables, setting up the default setup during the prebuild process, and checking if additional modules should be installed.\n\n1. Composer Support: This section adds support for composer-drupal-lenient based on the Drupal core version.\n\n1. Drupal Setup: This section checks if the setup has already run once and if no special setup is set by the DrupalPod extension. If not, it performs a series of setup tasks, including adding git.drupal.org to known hosts, ignoring specific directories during Drupal core development, and getting the required repo ready.\n\n1. Drupal Installation: This section handles the installation of Drupal, including enabling extra modules, setting the default admin theme, enabling the requested module or theme, and updating the database if working on core.\n\n1. Post-Installation: This section takes a snapshot of the database, saves a file to mark the workspace as already initiated, and measures the script time.\n\n1. Sourced Files:\n   - `setup_env.sh`: Sets up default environment variables based on a `.env` file.\n   - `install_modules.sh`: Sets environment variables for installing additional modules in Drupal.\n   - `drupal_version_specifics.sh`: Adds support for the `composer-drupal-lenient` package based on the Drupal core version.\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/drupalpod-setup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Initialize all variables with null if they do not exist\n: \"${DEBUG_SCRIPT:=}\"\n: \"${GITPOD_HEADLESS:=}\"\n: \"${DP_INSTALL_PROFILE:=}\"\n: \"${DP_EXTRA_DEVEL:=}\"\n: \"${DP_EXTRA_ADMIN_TOOLBAR:=}\"\n: \"${DP_PROJECT_TYPE:=}\"\n: \"${DEVEL_NAME:=}\"\n: \"${DEVEL_PACKAGE:=}\"\n: \"${ADMIN_TOOLBAR_NAME:=}\"\n: \"${ADMIN_TOOLBAR_PACKAGE:=}\"\n: \"${COMPOSER_DRUPAL_LENIENT:=}\"\n: \"${DP_CORE_VERSION:=}\"\n: \"${DP_ISSUE_BRANCH:=}\"\n: \"${DP_ISSUE_FORK:=}\"\n: \"${DP_MODULE_VERSION:=}\"\n: \"${DP_PATCH_FILE:=}\"\n\n# Assuming .sh files are in the same directory as this script\nDIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" >/dev/null 2>&1 && pwd)\"\n\nif [ -n \"$DEBUG_SCRIPT\" ] || [ -n \"$GITPOD_HEADLESS\" ]; then\n    set -x\nfi\n\nconvert_version() {\n    local version=$1\n    if [[ $version =~ \"-\" ]]; then\n        # Remove the part after the dash and replace the last numeric segment with 'x'\n        local base_version=${version%-*}\n        echo \"${base_version%.*}.x\"\n    else\n        echo \"$version\"\n    fi\n}\n\n# Test cases\n# echo $(convert_version \"9.2.5-dev1\")    # Output: 9.2.x\n# echo $(convert_version \"9.2.5\")         # Output: 9.2.5\n# echo $(convert_version \"10.1.0-beta1\")  # Output: 10.1.x\n# echo $(convert_version \"11.0-dev\")      # Output: 11.x\n\n# Skip setup if it already ran once and if no special setup is set by DrupalPod extension\nif [ ! -f \"${GITPOD_REPO_ROOT}\"/.drupalpod_initiated ]; then\n\n    # Set a default setup if project type wasn't specified\n    if [ -z \"$DP_PROJECT_TYPE\" ]; then\n        source \"$DIR/fallback_setup.sh\"\n    fi\n\n    source \"$DIR/git_setup.sh\"\n\n    # If this is an issue fork of Drupal core - set the drupal core version based on that issue fork\n    if [ \"$DP_PROJECT_TYPE\" == \"project_core\" ] && [ -n \"$DP_ISSUE_FORK\" ]; then\n        VERSION_FROM_GIT=$(grep 'const VERSION' \"${GITPOD_REPO_ROOT}\"/repos/drupal/core/lib/Drupal.php | awk -F \"'\" '{print $2}')\n        DP_CORE_VERSION=$(convert_version \"$VERSION_FROM_GIT\")\n        export DP_CORE_VERSION\n    fi\n\n    source \"$DIR/ddev_setup.sh\"\n\n    # Measure the time it takes to go through the script\n    script_start_time=$(date +%s)\n\n    source \"$DIR/contrib_modules_setup.sh\"\n    source \"$DIR/cleanup.sh\"\n    source \"$DIR/composer_setup.sh\"\n\n    if [ -n \"$DP_PATCH_FILE\" ]; then\n        echo Applying selected patch \"$DP_PATCH_FILE\"\n        cd \"${WORK_DIR}\" && curl \"$DP_PATCH_FILE\" | patch -p1\n    fi\n\n    # Prepare special setup to work with Drupal core\n    if [ \"$DP_PROJECT_TYPE\" == \"project_core\" ]; then\n        source \"$DIR/drupal_setup_core.sh\"\n    # Prepare special setup to work with Drupal contrib\n    elif [ -n \"$DP_PROJECT_NAME\" ]; then\n        source \"$DIR/drupal_setup_contrib.sh\"\n    fi\n\n    time \"${GITPOD_REPO_ROOT}\"/.gitpod/drupal/install-essential-packages.sh\n    # Configure phpcs for drupal.\n    cd \"$GITPOD_REPO_ROOT\" &&\n        vendor/bin/phpcs --config-set installed_paths vendor/drupal/coder/coder_sniffer\n\n    # ddev config auto updates settings.php and generates settings.ddev.php\n    ddev config --auto\n    # New site install\n    time ddev drush si -y --account-pass=admin --site-name=\"DrupalPod\" \"$DP_INSTALL_PROFILE\"\n\n    # Install devel and admin_toolbar modules\n    if [ \"$DP_EXTRA_DEVEL\" != '1' ]; then\n        DEVEL_NAME=\n    fi\n    if [ \"$DP_EXTRA_ADMIN_TOOLBAR\" != '1' ]; then\n        ADMIN_TOOLBAR_NAME=\n    fi\n\n    # Enable extra modules\n    cd \"${GITPOD_REPO_ROOT}\" &&\n        ddev drush en -y \\\n            \"$ADMIN_TOOLBAR_NAME\" \\\n            \"$DEVEL_NAME\"\n\n    # Enable the requested module\n    if [ \"$DP_PROJECT_TYPE\" == \"project_module\" ]; then\n        cd \"${GITPOD_REPO_ROOT}\" && ddev drush en -y \"$DP_PROJECT_NAME\"\n    fi\n\n    # Enable the requested theme\n    if [ \"$DP_PROJECT_TYPE\" == \"project_theme\" ]; then\n        cd \"${GITPOD_REPO_ROOT}\" && ddev drush then -y \"$DP_PROJECT_NAME\"\n        cd \"${GITPOD_REPO_ROOT}\" && ddev drush config-set -y system.theme default \"$DP_PROJECT_NAME\"\n    fi\n\n    # Take a snapshot\n    cd \"${GITPOD_REPO_ROOT}\" && ddev snapshot\n    echo \"Your database state was locally saved, you can revert to it by typing:\"\n    echo \"ddev snapshot restore --latest\"\n\n    # Save a file to mark workspace already initiated\n    touch \"${GITPOD_REPO_ROOT}\"/.drupalpod_initiated\n\n    # Finish measuring script time\n    script_end_time=$(date +%s)\n    runtime=$((script_end_time - script_start_time))\n    echo \"drupalpod-setup.sh script ran for\" $runtime \"seconds\"\nelse\n    cd \"${GITPOD_REPO_ROOT}\" && ddev start\nfi\n\n# Open internal preview browser with current website\npreview\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/fallback_setup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Set a default setup (when project type is not specified)\nexport DP_INSTALL_PROFILE='demo_umami'\nexport DP_PROJECT_TYPE='project_core'\nexport DP_PROJECT_NAME=\"drupal\"\nexport DP_CORE_VERSION='11.1.4'\nexport DP_EXTRA_DEVEL=1\nexport DP_EXTRA_ADMIN_TOOLBAR=1\n"
  },
  {
    "path": ".gitpod/drupal/drupalpod-setup/git_setup.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Add git.drupal.org to known_hosts\nif [ -z \"$GITPOD_HEADLESS\" ]; then\n    mkdir -p ~/.ssh\n    host=git.drupal.org\n    SSHKey=$(ssh-keyscan $host 2>/dev/null)\n    echo \"$SSHKey\" >>~/.ssh/known_hosts\nfi\n\n# Ignore specific directories during Drupal core development\ncp \"${GITPOD_REPO_ROOT}\"/.gitpod/drupal/templates/git-exclude.template \"${GITPOD_REPO_ROOT}\"/.git/info/exclude\n\n# Get the required repo ready\nif [ \"$DP_PROJECT_TYPE\" == \"project_core\" ]; then\n    # Find if requested core version is dev or stable\n    d=\"$DP_CORE_VERSION\"\n    case $d in\n    *.x)\n        # If dev - use git checkout origin/*\n        checkout_type=origin\n        ;;\n    *)\n        # stable - use git checkout tags/*\n        checkout_type=tags\n        ;;\n    esac\n\n    # Use origin or tags in git checkout command\n    cd \"${GITPOD_REPO_ROOT}\"/repos/drupal &&\n        git fetch origin &&\n        git fetch --all --tags &&\n        git checkout \"$checkout_type\"/\"$DP_CORE_VERSION\"\n\n    # Ignore specific directories during Drupal core development\n    cp \"${GITPOD_REPO_ROOT}\"/.gitpod/drupal/templates/git-exclude.template \"${GITPOD_REPO_ROOT}\"/repos/drupal/.git/info/exclude\nelse\n    # If not core - clone selected project into /repos and remove drupal core\n    rm -rf \"${GITPOD_REPO_ROOT}\"/repos/drupal\n    if [ ! -d repos/\"${DP_PROJECT_NAME}\" ]; then\n        mkdir -p repos\n        cd \"${GITPOD_REPO_ROOT}\"/repos && time git clone https://git.drupalcode.org/project/\"$DP_PROJECT_NAME\".git\n    fi\nfi\n\n# Set WORK_DIR\nexport WORK_DIR=\"${GITPOD_REPO_ROOT}\"/repos/$DP_PROJECT_NAME\n\n# Dynamically generate .gitmodules file\ncat <<GITMODULESEND >\"${GITPOD_REPO_ROOT}\"/.gitmodules\n# This file was dynamically generated by a script\n[submodule \"$DP_PROJECT_NAME\"]\npath = repos/$DP_PROJECT_NAME\nurl = https://git.drupalcode.org/project/$DP_PROJECT_NAME.git\nignore = dirty\nGITMODULESEND\n\n# Checkout specific branch only if there's issue_branch\nif [ -n \"$DP_ISSUE_BRANCH\" ]; then\n    # If branch already exist only run checkout,\n    if cd \"${WORK_DIR}\" && git show-ref -q --heads \"$DP_ISSUE_BRANCH\"; then\n        cd \"${WORK_DIR}\" && git checkout \"$DP_ISSUE_BRANCH\"\n    else\n        cd \"${WORK_DIR}\" && git remote add \"$DP_ISSUE_FORK\" https://git.drupalcode.org/issue/\"$DP_ISSUE_FORK\".git\n        cd \"${WORK_DIR}\" && git fetch \"$DP_ISSUE_FORK\"\n        cd \"${WORK_DIR}\" && git checkout -b \"$DP_ISSUE_BRANCH\" --track \"$DP_ISSUE_FORK\"/\"$DP_ISSUE_BRANCH\"\n    fi\nelif [ -n \"$DP_MODULE_VERSION\" ] && [ \"$DP_PROJECT_TYPE\" != \"project_core\" ]; then\n    cd \"${WORK_DIR}\" && git checkout \"$DP_MODULE_VERSION\"\nfi\n"
  },
  {
    "path": ".gitpod/drupal/install-essential-packages.sh",
    "content": "#!/usr/bin/env bash\nset -eu -o pipefail\n\n# Initialize all variables with null if they do not exist\n: \"${DEBUG_SCRIPT:=}\"\n: \"${GITPOD_HEADLESS:=}\"\n: \"${DP_EXTRA_DEVEL:=}\"\n: \"${DP_EXTRA_ADMIN_TOOLBAR:=}\"\n: \"${DEVEL_PACKAGE:=}\"\n: \"${ADMIN_TOOLBAR_PACKAGE:=}\"\n\nif [ -n \"$DEBUG_SCRIPT\" ] || [ -n \"$GITPOD_HEADLESS\" ]; then\n    set -x\nfi\n\n# Install devel and admin_toolbar modules\nif [ \"$DP_EXTRA_DEVEL\" != '1' ]; then\n    DEVEL_PACKAGE=\nfi\nif [ \"$DP_EXTRA_ADMIN_TOOLBAR\" != '1' ]; then\n    ADMIN_TOOLBAR_PACKAGE=\nfi\n\ncd \"${GITPOD_REPO_ROOT}\" && time ddev . composer require --dev \"drupal/core-dev\":* \"phpspec/prophecy-phpunit\":^2 -W --no-install\ncd \"${GITPOD_REPO_ROOT}\" && time ddev . composer require \"drush/drush\" \"drupal/coder\" \"$DEVEL_PACKAGE\" \"$ADMIN_TOOLBAR_PACKAGE\"\n\n# Only for Drupal core - apply special patch\nif [ \"$DP_PROJECT_TYPE\" == \"project_core\" ]; then\n    # Patch the scaffold index.php and update.php files\n    # See https://www.drupal.org/project/drupal/issues/3188703\n    # See https://www.drupal.org/project/drupal/issues/1792310\n    echo \"$(cat composer.json | jq '.scripts.\"post-install-cmd\" |= . + [\"src/composer-drupal-core-setup/patch-core-index-and-update.sh\"]')\" >composer.json\n    echo \"$(cat composer.json | jq '.scripts.\"post-update-cmd\" |= . + [\"src/composer-drupal-core-setup/patch-core-index-and-update.sh\"]')\" >composer.json\n\n    # Run the patch once\n    time src/composer-drupal-core-setup/patch-core-index-and-update.sh\n\n    # Get the major version of 'drush/drush'\n    drush_major_version=$(composer show drush/drush --no-ansi | awk '/versions/ {print $NF}' | cut -d '.' -f1)\n\n    drush_command_dir=\"$GITPOD_REPO_ROOT/drush/Commands/core_development\"\n    mkdir -p \"$drush_command_dir\"\n\n    # Copy the correct version of DevelopmentProjectCommands.php file to the drush commands directory\n    cp \"$GITPOD_REPO_ROOT/src/drush-commands-core-development/$drush_major_version/DevelopmentProjectCommands.php\" \"$drush_command_dir/.\"\nelse\n    # Only for contrib - add project as symlink\n\n    echo \"$(cat composer.json | jq '.scripts.\"post-install-cmd\" |= . + [\"repos/add-project-as-symlink.sh\"]')\" >composer.json\n    echo \"$(cat composer.json | jq '.scripts.\"post-update-cmd\" |= . + [\"repos/add-project-as-symlink.sh\"]')\" >composer.json\n    time repos/add-project-as-symlink.sh\nfi\n"
  },
  {
    "path": ".gitpod/drupal/ssh/00-interactive-ssh-setup.sh",
    "content": "#!/bin/bash\n\n\n# Copy your public key\n# php -S localhost:8000 id_rsa.backup & sleep 3 & gp preview $(gp url 8000)\n# killall php\n\n# while-menu-dialog: a menu driven system information program\n\nDIALOG_CANCEL=1\nDIALOG_ESC=255\nHEIGHT=0\nWIDTH=0\n\ndisplay_result() {\n  dialog --title \"$1\" \\\n    --no-collapse \\\n    --msgbox \"$result\" 0 0\n}\n\nwhile true; do\n  exec 3>&1\n  selection=$(dialog \\\n    --backtitle \"Installer/Services menu\" \\\n    --title \"Menu\" \\\n    --clear \\\n    --cancel-label \"Exit\" \\\n    --menu \"Please select:\" $HEIGHT $WIDTH 4 \\\n    \"1\" \"Setup SSH\" \\\n    2>&1 1>&3)\n  exit_status=$?\n  exec 3>&-\n  case $exit_status in\n    $DIALOG_CANCEL)\n      clear\n      echo \"Program terminated.\"\n      exit\n      ;;\n    $DIALOG_ESC)\n      clear\n      echo \"Program aborted.\" >&2\n      exit 1\n      ;;\n  esac\n  case $selection in\n    0 )\n      clear\n      echo \"Program terminated.\"\n      ;;\n    1 )\n      result=$(code .gitpod/drupal/ssh/instructions-template.md)\n      display_result \"If you completed the instructions above - click OK\"\n      .gitpod/drupal/ssh/04-confirm-ssh-setup.sh\n      # gp preview https://drupal.org/user --external\n      ;;\n  esac\ndone\n\n"
  },
  {
    "path": ".gitpod/drupal/ssh/01-check-private-ssh.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# Check if ~/.ssh/id_rsa already exist\nif [ -f ~/.ssh/id_rsa ]; then\n      echo \"No need to setup a key, SSH key already exists.\"\nelse\n      if [ -z \"$DRUPAL_SSH_KEY\" ]; then\n            # DRUPAL_SSH_KEY environment variable is not set, check if SSH ley was create during this session\n            if [ -f /workspace/id_rsa ] ; then\n                  # Edge case where user already setup key in workspace that timed out.\n                  echo \"No need to setup a key, SSH key found.\"\n                  mkdir -p ~/.ssh\n                  cp /workspace/id_rsa ~/.ssh/.\n            fi\n      else\n            echo \"Setting SSH key from environment variable\"\n            mkdir -p ~/.ssh\n            printenv DRUPAL_SSH_KEY > ~/.ssh/id_rsa\n            chmod 600 ~/.ssh/id_rsa\n      fi\n      # Ask for SSH keyphrase only once\n      if ssh-add -l > /dev/null ; then\n            eval \"$(ssh-agent -s)\" > /dev/null\n            ssh-add -q ~/.ssh/id_rsa\n      fi\nfi\n"
  },
  {
    "path": ".gitpod/drupal/ssh/02-setup-private-ssh.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\nSSH_SETUP_REQUIRED=true\n\n# Add git.drupal.org to known_hosts\nmkdir -p ~/.ssh\nhost=git.drupal.org\nSSHKey=$(ssh-keyscan $host 2> /dev/null)\necho \"$SSHKey\" >> ~/.ssh/known_hosts\n\n# Validate private SSH key in Gitpod with public SSH key in drupal.org\nif ssh -T git@git.drupal.org; then\n      read -r -p \"SSH key was already confirmed with Drupal.org, are you sure you want to recreate SSH key? [y/N]\" setup_ssh\n      if [ \"$setup_ssh\" != \"y\" ] && [ \"$setup_ssh\" != \"Y\" ]; then\n            SSH_SETUP_REQUIRED=false\n      fi\nfi\n\nif $SSH_SETUP_REQUIRED; then\n      # Create ssh key pairing + instructions to paste public key in drupal.org\n      ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa\n      .gitpod/drupal/ssh/03-generate-drupal-ssh-instructions.sh\n      echo \"Follow instructions for copying public key to Drupal\"\n      echo \"Test SSH by running .gitpod/drupal/ssh/04-confirm-ssh-setup.sh\"\nfi\n"
  },
  {
    "path": ".gitpod/drupal/ssh/03-generate-drupal-ssh-instructions.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# create instructions file with user's public key\ncat ~/.ssh/id_rsa.pub > /workspace/public_key.md\ncat .gitpod/drupal/ssh/instructions-template.md > /workspace/drupal-public-key-setup.md\ncat ~/.ssh/id_rsa.pub >> /workspace/drupal-public-key-setup.md\n\ngp open /workspace/drupal-public-key-setup.md\n"
  },
  {
    "path": ".gitpod/drupal/ssh/04-confirm-ssh-setup.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# Add git.drupal.org to known_hosts\nmkdir -p ~/.ssh\nhost=git.drupal.org\nSSHKey=$(ssh-keyscan $host 2> /dev/null)\necho \"$SSHKey\" >> ~/.ssh/known_hosts\n\n# Ask for SSH keyphrase only once\nif ssh-add -l > /dev/null ; then\n    eval \"$(ssh-agent -s)\" > /dev/null\n    ssh-add -q ~/.ssh/id_rsa\nfi\n\n# Validate private SSH key in Gitpod with public SSH key in drupal.org\nif ssh -T git@git.drupal.org; then\n    echo \"Setup was succesful, saving your private key in Gitpod\"\n    # Set private SSH key as Gitpod variable anvironment\n    gp env \"DRUPAL_SSH_KEY=$(cat ~/.ssh/id_rsa)\" > /dev/null\n    # Copy key to /workspace in case this workspace times out\n    cp ~/.ssh/id_rsa /workspace/.\n    # Set repo remote branch to SSH (in case it was added as HTTPS)\n    .gitpod/drupal/ssh/05-set-repo-as-ssh.sh\nelse\n    if [ ! -f ~/.ssh/id_rsa.pub ] ; then\n        echo \"Setup failed, create private key again\"\n        rm -f /workspace/id_rsa\n        rm -rf ~/.ssh\n        .gitpod/drupal/ssh/02-setup-private-ssh.sh\n    else\n        echo \"Setup failed, please confirm you copied public key to Drupal\"\n        .gitpod/drupal/ssh/03-generate-drupal-ssh-instructions.sh\n    fi\nfi\n"
  },
  {
    "path": ".gitpod/drupal/ssh/05-set-repo-as-ssh.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# Set a specific branch if there's issue_fork\nif [ -n \"$DP_ISSUE_FORK\" ]; then\n    cd \"${GITPOD_REPO_ROOT}\"/repos/\"$DP_PROJECT_NAME\" && git remote set-url \"$DP_ISSUE_FORK\" git@git.drupal.org:issue/\"$DP_ISSUE_FORK\".git\nfi\n"
  },
  {
    "path": ".gitpod/drupal/ssh/instructions-template.md",
    "content": "# One-time public key setup\n1. Press the OK button in the Terminal below and follow the instructions.\n2. Open https://www.drupal.org/user\n3. Click on \"Git Access\"\n4. Create a Git username if you don't have one.\n5. Click on \"SSH keys\", \n6. Click on \"Add a public key\"\n7. Copy the content below \n8. Paste it inside \"Key\" field \n9. Click on \"Save\" button.\n10. Run in Gitpod terminal `.gitpod/drupal/ssh/04-confirm-ssh-setup.sh`\n\n\n\n"
  },
  {
    "path": ".gitpod/drupal/templates/git-exclude.template",
    "content": "# git ls-files --others --exclude-from=.git/info/exclude\n# Lines that start with '#' are comments.\n# For a project mostly in C, the following would be a good set of\n# exclude patterns (uncomment them if you want to use them):\n# *.[oa]\n# *~\n# Exclude the following directories for Drupal core development\nvendor\nsites/simpletest\nsites/default/settings.php\n"
  },
  {
    "path": ".gitpod/images/Dockerfile",
    "content": "FROM gitpod/workspace-base as workspace-base\nSHELL [\"/bin/bash\", \"-c\"]\n\nRUN sudo apt-get -qq update\n\n# Install dialog (interactive script)\nRUN sudo apt-get -qq install -y dialog\n\n# Install DDEV\nUSER gitpod\n# Add DDEV’s GPG key to your keyring\nRUN curl -fsSL https://pkg.ddev.com/apt/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/ddev.gpg > /dev/null\n# Add DDEV releases to your package repository\nRUN echo \"deb [signed-by=/etc/apt/keyrings/ddev.gpg] https://pkg.ddev.com/apt/ * *\" | sudo tee /etc/apt/sources.list.d/ddev.list >/dev/null\n# Update package information and install DDEV\nRUN sudo apt-get update && sudo apt-get install -y ddev\n\n# Install GitUI (terminal-ui for git)\nARG GITUI_VERSION=v0.27.0\nRUN wget https://github.com/extrawurst/gitui/releases/download/${GITUI_VERSION}/gitui-linux-x86_64.tar.gz -P /tmp\nRUN sudo tar xzf /tmp/gitui-linux-x86_64.tar.gz -C /usr/bin\n\n# Install LazyGit (terminal-ui for git)\nARG LAZYGIT_VERSION=0.48.0\nRUN wget https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz -P /tmp\nRUN tar -C /tmp -xf /tmp/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz\nRUN sudo install /tmp/lazygit /usr/local/bin\n\n# (get latest Minio version from https://dl.min.io/client/mc/release/linux-amd64/)\n# Install Minio client\nARG MINIO_CLIENT_VERSION=mcli_20250221160046.0.0_amd64.deb\nRUN wget https://dl.min.io/client/mc/release/linux-amd64/${MINIO_CLIENT_VERSION}\nRUN sudo dpkg -i ${MINIO_CLIENT_VERSION}\nRUN sudo mv /usr/local/bin/mcli /usr/local/bin/mc\n\n# End workspace-base\n\nFROM scratch as drupalpod-gitpod-base\nSHELL [\"/bin/bash\", \"-c\"]\nCOPY --from=workspace-base / /\n"
  },
  {
    "path": ".gitpod/images/push.sh",
    "content": "#!/bin/bash\nset -eu -o pipefail\n# if [ -n \"$DEBUG_SCRIPT\" ]; then\n#     set -x\n# fi\n\n# Run `docker login` to authenticate and push new images to docker hub\n# Update /.gitpod.yml with the new image file\n\n# \"%Y-%m-%d\"\nTODAY=$(date +\"%Y%m%d\")\nREPO_NAME=drupalpod/drupalpod-gitpod-base\nDOCKER_REPO=\"$REPO_NAME\":\"$TODAY\"\nDOCKER_REPO_LATEST=\"$REPO_NAME\":latest\n\necho \"Pushing ${DOCKER_REPO}\"\nset -x\n# Build only current architecture and load into docker\n# docker buildx build -t \"${DOCKER_REPO}\" --push --target=drupalpod-gitpod-base --platform=linux/amd64 .\ndocker build --target drupalpod-gitpod-base -t \"${DOCKER_REPO}\" -t \"${DOCKER_REPO_LATEST}\" .\ndocker image push \"${DOCKER_REPO}\"\ndocker image push \"${DOCKER_REPO_LATEST}\"\n\n# docker run -it --rm <full_docker_image_tag> bash\n# docker image inspect <full_docker_image_tag>\n"
  },
  {
    "path": ".gitpod/utils/ddev-in-gitpod-setup.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ] || [ -n \"$GITPOD_HEADLESS\" ]; then\n    set -x\nfi\n\n# Misc housekeeping before start\nddev config global --instrumentation-opt-in=true\n"
  },
  {
    "path": ".gitpod/utils/env-setup.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\ncd \"${GITPOD_REPO_ROOT}\"/.gitpod/utils/script-templates || exit\n\n# Create a phpstorm command\nsudo cp phpstorm.template.sh /usr/local/bin/phpstorm\n\n# Create a preview command\nsudo cp preview.template.sh /usr/local/bin/preview\n\n# Create a protect-my-git command\nsudo cp protect-my-git.template.sh /usr/local/bin/protect-my-git\n\n# Create php command (run php inside ddev container)\nsudo cp ddev-php.template.sh /usr/local/bin/php\n\n# Create drush command (run drush inside ddev container)\nsudo cp ddev-drush.template.sh /usr/local/bin/drush\n\n# Create yarn command (run yarn inside ddev container)\nsudo cp ddev-yarn.template.sh /usr/local/bin/yarn\n\n# Create composer command (run composer inside ddev container)\nsudo cp ddev-composer.template.sh /usr/local/bin/composer\n\n# Create node command (run composer inside ddev container)\nsudo cp ddev-node.template.sh /usr/local/bin/node\n\n# Create nvm command (run composer inside ddev container)\nsudo cp ddev-nvm.template.sh /usr/local/bin/nvm\n\n# Create npx command (run composer inside ddev container)\nsudo cp ddev-npx.template.sh /usr/local/bin/npx\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-composer.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'composer $*' in ddev\"\nddev exec_d composer \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-drush.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'drush $*' in ddev\"\nddev exec_d drush \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-node.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'node $*' in ddev\"\nddev exec_d node \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-npx.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'npx $*' in ddev\"\nddev exec_d npx \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-nvm.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'nvm $*' in ddev\"\nddev exec_d nvm \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-php.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'php $*' in ddev\"\nddev exec_d php \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/ddev-yarn.template.sh",
    "content": "#!/usr/bin/env bash\necho \"Notice: running 'yarn $*' in ddev\"\nddev exec_d yarn \"$@\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/phpstorm.template.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\nif [ ! -x ~/.projector/configs/PhpStorm/run.sh ]; then\n  echo \"PhpStorm runner not found\" && exit 1\nfi\n\n# When port 9999 is ready - open that port in a new browser tab\ngp await-port 9999 && gp preview \"$(gp url 9999)\" --external &\n\n# Run PHPStorm\n~/.projector/configs/PhpStorm/run.sh \"$GITPOD_REPO_ROOT\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/preview.template.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# Preview port 8080\ngp preview \"$(gp url 8080)\"\n"
  },
  {
    "path": ".gitpod/utils/script-templates/protect-my-git.template.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# Remove access to user's Git credentials (restore by restart workspace)\ngit config --global --unset credential.helper\n"
  },
  {
    "path": ".gitpod/utils/send-a-message-gcs.sh",
    "content": "#!/usr/bin/env bash\n\n# Get current user and current branch\nbranch_user=\"$GITPOD_GIT_USER_NAME, $(git branch --show-current)\"\n\n# Load env vars during prebuild using `gp env` command\nif [ -z \"$IFTTT_TOKEN\" ]; then\n    eval \"$(gp env -e | grep IFTTT_TOKEN)\"\nfi\n\n# Load env vars during prebuild using `gp env` command\nif [ -z \"$DP_GOOGLE_ACCESS_KEY\" ]; then\n    eval \"$(gp env -e | grep DP_GOOGLE_ACCESS_KEY)\"\nfi\n\n# Load env vars during prebuild using `gp env` command\nif [ -z \"$DP_GOOGLE_SECRET\" ]; then\n    eval \"$(gp env -e | grep DP_GOOGLE_SECRET)\"\nfi\n\n# Establish connection with Google Cloud through Minio client\nmc config host add gcs https://storage.googleapis.com \"$DP_GOOGLE_ACCESS_KEY\" \"$DP_GOOGLE_SECRET\"\n\n# If there's a problem send the error code\nif mc find gcs/drupalpod/ready-made-envs.tar.gz; then\n    message=\"Success: Google Cloud is ready\"\nelse\n    message=\"Error: Envs file wasn't found, it will be recreated\"\nfi\n\n# Send a message through IFTTT\ncurl -X POST -H \"Content-Type: application/json\" -d \"{\\\"value1\\\":\\\"$branch_user\\\",\\\"value2\\\":\\\"$message\\\"}\" https://maker.ifttt.com/trigger/drupalpod_prebuild_initiated/with/key/\"$IFTTT_TOKEN\"\n"
  },
  {
    "path": ".gitpod/utils/send-a-message-gitpod.sh",
    "content": "#!/usr/bin/env bash\n\n# Get current user and current branch\nbranch_user=\"$GITPOD_GIT_USER_NAME, $(git branch --show-current)\"\n\n# Load env vars during prebuild using `gp env` command\nif [ -z \"$DP_READY_MADE_ENVS_URL\" ]; then\n    eval \"$(gp env -e | grep DP_READY_MADE_ENVS_URL)\"\nfi\n\n# Load env vars during prebuild using `gp env` command\nif [ -z \"$IFTTT_TOKEN\" ]; then\n    eval \"$(gp env -e | grep IFTTT_TOKEN)\"\nfi\n\n# Check the status of ready-made envs file\n# https://stackoverflow.com/a/53358157/5754049\nurl_status=$(wget --server-response --spider --quiet \"${DP_READY_MADE_ENVS_URL}\" 2>&1 | awk 'NR==1{print $2}')\n\n# If there's a problem send the error code\nif [ \"$url_status\" = '200' ]; then\n    message=\"100%\"\nelse\n    message=\"Error: $url_status - $DP_READY_MADE_ENVS_URL\"\nfi\n\n# Send a message through IFTTT\ncurl -X POST -H \"Content-Type: application/json\" -d \"{\\\"value1\\\":\\\"$branch_user\\\",\\\"value2\\\":\\\"$message\\\"}\" https://maker.ifttt.com/trigger/drupalpod_prebuild_initiated/with/key/\"$IFTTT_TOKEN\"\n"
  },
  {
    "path": ".gitpod/utils/set-base-environment.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ]; then\n    set -x\nfi\n\n# Load default envs\n# export \"$(grep -v '^#' \"$GITPOD_REPO_ROOT\"/.env | xargs -d '\\n')\"\n\n# Clone Drupal core repo\nmkdir -p \"${GITPOD_REPO_ROOT}\"/repos\ncd \"${GITPOD_REPO_ROOT}\"/repos && time git clone https://git.drupalcode.org/project/drupal.git\n"
  },
  {
    "path": ".gitpod.yml",
    "content": "image: drupalpod/drupalpod-gitpod-base:20250309\n\n# DDEV and composer are running as part of the prebuild\n# when starting a workspace all docker images are ready\ntasks:\n  - init: |\n      .gitpod/utils/send-a-message-gcs.sh > /tmp/output1.txt\n      .gitpod/utils/ddev-in-gitpod-setup.sh\n      .gitpod/utils/set-base-environment.sh\n    command: |\n      # Temporary fix for wrong value of GITPOD_REPO_ROOT when opening a Gitpod snapshot\n      # Todo: remove this when this issue is resolved - https://github.com/gitpod-io/gitpod/issues/9804\n      if [ \"$GITPOD_REPO_ROOT\" == '/workspace' ]; then\n        export GITPOD_REPO_ROOT=\"$THEIA_WORKSPACE_ROOT\"\n      fi\n      .gitpod/utils/ddev-in-gitpod-setup.sh\n      .gitpod/utils/env-setup.sh\n      .gitpod/drupal/ssh/01-check-private-ssh.sh\n      .gitpod/drupal/drupalpod-setup/drupalpod-setup.sh\n\n# VScode xdebug extension\nvscode:\n  extensions:\n    # PHP extensions.\n    - felixfbecker.php-debug\n    - wongjn.php-sniffer\n    - neilbrayfield.php-docblocker\n    - bmewburn.vscode-intelephense-client\n    - andrewdavidblum.drupal-smart-snippets\n\n    # Twig extensions.\n    - mblode.twig-language-2\n\n    # Help extensions.\n    - drupal-mentoring.drupalpod-ext\n\n    # Bash extensions.\n    - timonwong.shellcheck\n    - rogalmic.bash-debug\n\nports:\n  # Used by JS projects\n  - port: 3000\n    onOpen: ignore\n  # Used by DDEV - local db clients\n  - port: 3306\n    name: Database\n    description: Access for local database clients\n    onOpen: ignore\n  # Used by JS projects\n  - port: 5000\n    onOpen: ignore\n  # Used by MailHog\n  - port: 8027\n    name: MailHog\n    description: MailHog\n    onOpen: ignore\n  # Used by phpMyAdmin\n  - port: 8036\n    name: phpMyAdmin\n    description: phpMyAdmin\n    onOpen: ignore\n  # Direct-connect DDEV-webserver port that is the main port\n  - port: 8080\n    name: website\n    description: website\n    onOpen: ignore\n  # Ignore host https port\n  - port: 8443\n    name: (not used)\n    description: host https port\n    onOpen: ignore\n  # xdebug port\n  - port: 9003\n    name: xdebug\n    description: xdebug\n    onOpen: ignore\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n    // Use IntelliSense to learn about possible attributes.\n    // Hover to view descriptions of existing attributes.\n    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Listen for XDebug\",\n            \"type\": \"php\",\n            \"request\": \"launch\",\n            \"hostname\": \"0.0.0.0\",\n            \"port\": 9003,\n            \"pathMappings\": {\n                \"/var/www/html\": \"${workspaceRoot}\"\n            }\n        },\n        {\n            \"type\": \"bashdb\",\n            \"request\": \"launch\",\n            \"name\": \"Bash-Debug (simplest configuration)\",\n            \"program\": \"${file}\"\n        }\n    ]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"breadcrumbs.enabled\": true,\n  \"css.validate\": true,\n  \"diffEditor.ignoreTrimWhitespace\": false,\n  \"editor.tabSize\": 2,\n  \"editor.autoIndent\": \"full\",\n  \"editor.insertSpaces\": true,\n  \"editor.formatOnPaste\": true,\n  \"editor.formatOnSave\": false,\n  \"editor.renderWhitespace\": \"boundary\",\n  \"editor.wordWrapColumn\": 80,\n  \"editor.wordWrap\": \"off\",\n  \"editor.detectIndentation\": true,\n  \"editor.rulers\": [\n    80\n  ],\n  \"files.associations\": {\n    \"*.inc\": \"php\",\n    \"*.module\": \"php\",\n    \"*.install\": \"php\",\n    \"*.theme\": \"php\",\n    \"*.profile\": \"php\",\n    \"*.tpl.php\": \"php\",\n    \"*.test\": \"php\",\n    \"*.php\": \"php\",\n    \"*.info\": \"ini\",\n    \"*.html\": \"twig\",\n  },\n  \"emmet.includeLanguages\": {\n    \"twig\": \"html\"\n  },\n  \"files.trimTrailingWhitespace\": true,\n  \"files.insertFinalNewline\": true,\n  \"html.format.enable\": true,\n  \"html.format.wrapLineLength\": 80,\n  \"redhat.telemetry.enabled\": false,\n\n  /* PHP Intelephense */\n  \"php.validate.executablePath\": \"/usr/local/bin/php\",\n  \"php.suggest.basic\": false,\n\n  /* phpSniffer settings */\n  \"phpSniffer.executablesFolder\": \"vendor/bin\",\n  \"phpSniffer.standard\": \"Drupal\",\n\n  /* php-docblocker settings */\n  \"php-docblocker.gap\": true,\n  \"php-docblocker.useShortNames\": true,\n\n  // Allow searching files that are in .gitignore\n  \"search.useIgnoreFiles\": false,\n\n  // Configure glob patterns for excluding files and folders in fulltext searches and quick open. Inherits all glob patterns from the `files.exclude` setting.\n  \"search.exclude\": {\n    \"**/vendor\": true,\n  },\n  \"workbench.startupEditor\": \"none\",\n}\n"
  },
  {
    "path": "Drupal Core Development Composer Project.md",
    "content": "# Drupal Core Development Composer Project\n\nThis is a Composer project template for developing Drupal core.\n\nIt allows:\n\n- a clean git clone of Drupal core.\n- Composer dependencies of Drupal core are installed, so Drupal can be installed\n  and run as normal.\n- other Composer packages you might want, such as Drush, Devel module, and Admin\n  Toolbar module, can be installed too, but don't affect the composer files\n  that are part of Drupal core.\n\n## Installation\n\nTo install a Drupal project for working on Drupal core:\n\n```\n$ composer create-project joachim-n/drupal-core-development-project\n```\n\nComposer will clone Drupal core into a 'repos/drupal' directory within the\nproject, and then symlink that into the project when it installs Drupal core.\n\nOnce the installation is complete, you can install Drupal as normal, either with\n`drush si` or with the web UI.\n\n## Limitations\n\nDuring some Composer commands you may see multiple copies of this error message:\n\n> Could not scan for classes inside [Drupal class filename].\n\nThese are harmless and can be ignored.\n\n## Developing Drupal core\n\nYou can use the Drupal core git clone at 'repos/drupal/' in any way you like:\ncreate feature branches, clone from drupal.org issue forks, and so on. Changes\nyou make to files in the git clone affect the project, since the git clone is\nsymlinked into it.\n\n### Managing the Composer project\n\nYou can install any Composer packages you like, including Drupal contrib\nmodules, without affecting the git clone of Drupal core. To work with Composer,\nyou need to be in the root directory of the project.\n\nChanges to the git clone's composer.json will be taken into account by Composer.\nSo for example, if pulling from the main branch of Drupal core changes Composer\ndependencies, and in particular if you change to a different core major or minor\nbranch, you should run `composer update` on the project to install these.\n\n### Running tests\n\nThe following are required to run tests.\n\n#### PHPUnit configuration\n\nThe simplest way to run tests with this setup is to put the phpunit.xml file in\nthe project root and then run tests from there:\n\n$ vendor/bin/phpunit web/core/PATH-TO-TEST-FILE/TestFile.php\n\nTo set this up, copy Drupal core's sample phpunit.xml file to the project root:\n\n$ cp web/core/phpunit.xml.dist phpunit.xml\n\nThen change the `bootstrap` attribute so the path is correct:\n\n```\n<phpunit bootstrap=\"web/core/tests/bootstrap.php\"\n```\n\n## Technical details\n\nThe rest of this document is gory technical details you only need to know if\nyou're working on this project template or debugging it.\n\n### How it works\n\nThe composer.json at the project root uses a Composer path repository so that\nwhen the drupal/drupal package is installed, it's symlinked in from the Drupal\ncore git clone, at the branch that the clone has checked out.\n\nDrupal core itself defines path repositories in its top-level composer.json.\nThese need to be overridden in the project root composer.json so they point to\ninside the Drupal core git clone.\n\nAdditionally, the paths to the drupal/core-recommended and drupal/core-dev\npackages are defined as path repositories, so that the package versions which\nare fixed in those metapackages are respected in the project. This means the\nsame versions are installed as if installing Composer packages on a plain git\nclone of Drupal core.\n\n### Manual Installation\n\nClone the repository for this template into, say, 'drupal-dev'.\n\n```\n$ cd drupal-dev\n\n# Create a folder in which to store git clones, which Composer will symlink in.\n$ mkdir repos\n$ cd repos\n\n# Clone Drupal core, to whatever branch you like.\n$ git clone --branch 9.2.x https://git.drupalcode.org/project/drupal.git\n\n# Go back to the project root.\n$ cd ..\n\n# Install packages with Composer.\n$ composer install\n```\n\nThe Drupal core git clone will be clean apart from:\n\n```\n\tsites/default/settings.php\n\tvendor\n```\n\nSince it doesn't have a .gitignore at the top level, you can add one to ignore\nthose files if you like.\n\n### Project template development installation\n\nTo test how Composer creates a new project from the template, you need a git\nclone of the template repository.\n\nIn a separate location, do:\n\n```\n$ composer create-project joachim-n/drupal-core-development-project NEW_PROJECT_DIRECTORY --stability=dev --repository='{\"url\":\"/path/to/git/clone/of/project/template/\",\"type\":\"vcs\"}'\n```\n\n### Workarounds\n\nSeveral workarounds are necessary to make Drupal core work correctly when\nsymlinked into the project. These are all taken care of by Composer scripts\nduring installation. Details are below.\n\nMost if not all of these will no longer be needed once\nhttps://www.drupal.org/project/drupal/issues/1792310 is fixed.\n\n#### Vendor folder\n\nThe vendor folder has to be symlinked into the Drupal core repository, because\notherwise code in core that expects to find a Composer autoloader fails.\n\nThis is done by a Composer script after initial installation. The manual command\nis:\n\n```\nln -s ../../vendor ./repos/drupal/vendor\n```\n\n#### App root files patches\n\nThe index.php and update.php scaffold files have to be patched after they have\nbeen copied to web/index.php, because otherwise DrupalKernel guesses the Drupal\napp root as incorrectly being inside the Drupal core git clone, which means it\ncan't find the settings.php file.\n\nThis is done by a Composer script after initial installation. The manual\ncommands are:\n\n```\ncd web && patch -p1 <../scaffold/scaffold-patch-index-php.patch\ncd web && patch -p1 <../scaffold/scaffold-patch-update-php.patch\n```\n\nSee https://www.drupal.org/project/drupal/issues/3188703 for more detail.\n\n#### Drush rebuild command\n\nThe Drush cache:rebuild command does not work correctly if contrib modules are\npresent, because it calls drupal_rebuild() which lets DrupalKernel guess the\napp root incorrectly.\n\nThis project template contains a /drush folder which has a command class which\nreplaces that command with custom code to correctly handle the app root.\n\n#### Simpletest folder\n\nWhen running browser tests, the initial setup of Drupal in\nFunctionalTestSetupTrait::prepareEnvironment() creates a site folder using the\nreal file locations with symlinks resolved, thus\n`repos/drupal/sites/simpletest`, but during the request to the test site, Drupal\nlooks in `/web/sites/simpletest`.\n\nAdditionally, the HTML files output from Browser tests are written into the\nDrupal core git clone, and so the URLs shown in PHPUnit output are incorrect.\n\nThe fix for both of these is to create the simpletest site folder in the web\nroot and symlink it into the Drupal core git clone.\n\nThis is done by a Composer script after initial installation. The manual command\nis:\n\n```\nmkdir -p web/sites/simpletest\nln -s ../../../web/sites/simpletest repos/drupal/sites\n```\n\n#### Autoload of Drupal composer testing classes\n\nDrupal's /composer folder is not symlinked and therefore isn't visible to\nComposer. It's needed for some tests, and so is declared as an autoload\nlocation.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Ofer Shaal\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# DrupalPod\n\n## **IF YOU ARE ON GITHUB THIS IS NOT THE REPOSITORY YOU WANT**\n## **THE DRUPALPOD REPOSITORY HAS MOVED TO https://drupal.org/project/DrupalPod**\n\n* Please file issues there.\n* Please do Merge Requests there. \n* This repo is just a mirror.\n\n"
  },
  {
    "path": "recipes/.gitignore",
    "content": "/README.txt"
  },
  {
    "path": "src/composer-drupal-core-setup/patch-core-index-and-update.sh",
    "content": "#!/usr/bin/env bash\nif [ -n \"$DEBUG_SCRIPT\" ] || [ -n \"$GITPOD_HEADLESS\" ]; then\n    set -x\nfi\n\ngit apply --directory=web -v src/composer-drupal-core-setup/scaffold-patch-index-and-update-php.patch\n"
  },
  {
    "path": "src/composer-drupal-core-setup/scaffold-patch-index-and-update-php.patch",
    "content": "diff --git a/index.php b/index.php\nindex 750dc28..bda22ce 100644\n--- a/index.php\n+++ b/index.php\n@@ -13,7 +13,7 @@ use Symfony\\Component\\HttpFoundation\\Request;\n\n $autoloader = require_once 'autoload.php';\n\n-$kernel = new DrupalKernel('prod', $autoloader);\n+$kernel = new DrupalKernel('prod', $autoloader, TRUE, __DIR__);\n\n $request = Request::createFromGlobals();\n $response = $kernel->handle($request);\ndiff --git a/update.php b/update.php\nindex b65649c..02ffa22 100644\n--- a/update.php\n+++ b/update.php\n@@ -21,7 +21,7 @@ if (drupal_valid_test_ua()) {\n   gc_disable();\n }\n\n-$kernel = new UpdateKernel('prod', $autoloader, FALSE);\n+$kernel = new UpdateKernel('prod', $autoloader, FALSE, __DIR__);\n $request = Request::createFromGlobals();\n\n $response = $kernel->handle($request);\n"
  },
  {
    "path": "src/drush-commands-core-development/11/DevelopmentProjectCommands.php",
    "content": "<?php\n\nnamespace Drush\\Commands\\core_development;\n\nuse Consolidation\\AnnotatedCommand\\AnnotationData;\nuse Drupal\\Core\\DrupalKernel;\nuse Drupal\\Core\\Site\\Settings;\nuse Drush\\Commands\\core\\CacheCommands;\nuse Drush\\Drush;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\ArgvInput;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n/**\n * Replaces the cache:rebuild command to correctly work with symlinked Drupal.\n *\n * This prevents contrib modules from vanishing when the cache:rebuild command\n * is run.\n *\n * For maintainability, changes from the original are marked 'CHANGE'.\n */\nclass DevelopmentProjectCommands extends CacheCommands {\n\n  /**\n   * @hook replace-command cache:rebuild\n   */\n  public function rebuild($options = ['cache-clear' => true]) {\n    if (!$options['cache-clear']) {\n      $this->logger()->info(dt(\"Skipping cache-clear operation due to --no-cache-clear option.\"));\n      return true;\n    }\n\n    // CHANGE: Get the app root ourselves instead of using DRUPAL_ROOT.\n    $app_root = $this->getAppRoot();\n    chdir($this->getAppRoot());\n\n    // We no longer clear APC and similar caches as they are useless on CLI.\n    // See https://github.com/drush-ops/drush/pull/2450\n\n    $autoloader = $this->loadDrupalAutoloader(DRUPAL_ROOT);\n    require_once DRUSH_DRUPAL_CORE . '/includes/utility.inc';\n\n    $request = Drush::bootstrap()->getRequest();\n    DrupalKernel::bootEnvironment();\n\n    // Avoid 'Only variables should be passed by reference'\n    // CHANGE: Don't use DRUPAL_ROOT.\n    $root = $app_root;\n    $site_path = DrupalKernel::findSitePath($request);\n    Settings::initialize($root, $site_path, $autoloader);\n\n    // drupal_rebuild() calls drupal_flush_all_caches() itself, so we don't do it manually.\n    // CHANGE: call our own version of drupal_rebuild().\n    $this->drupal_rebuild($autoloader, $request);\n    $this->logger()->success(dt('Cache rebuild complete.'));\n  }\n\n  /**\n   * Replacement for drupal_rebuild().\n   *\n   * This passes the app root to DrupalKernel.\n   */\n  function drupal_rebuild($class_loader, Request $request) {\n    // Remove Drupal's error and exception handlers; they rely on a working\n    // service container and other subsystems and will only cause a fatal error\n    // that hides the actual error.\n    restore_error_handler();\n    restore_exception_handler();\n\n    // Invalidate the container.\n    // Bootstrap up to where caches exist and clear them.\n    // CHANGE: Pass the correct app root to DrupalKernel.\n    $kernel = new DrupalKernel('prod', $class_loader, TRUE, $this->getAppRoot());\n    $kernel->setSitePath(DrupalKernel::findSitePath($request));\n    $kernel->invalidateContainer();\n    $kernel->boot();\n    $kernel->preHandle($request);\n    // Ensure our request includes the session if appropriate.\n    if (PHP_SAPI !== 'cli') {\n      $request->setSession($kernel->getContainer()->get('session'));\n    }\n\n    drupal_flush_all_caches($kernel);\n\n    // Disable recording of cached pages.\n    \\Drupal::service('page_cache_kill_switch')->trigger();\n\n    // Restore Drupal's error and exception handlers.\n    // @see \\Drupal\\Core\\DrupalKernel::boot()\n    set_error_handler('_drupal_error_handler');\n    set_exception_handler('_drupal_exception_handler');\n  }\n\n  /**\n   * Gets the app root.\n   *\n   * @return string\n   *   The app root.\n   */\n  protected function getAppRoot(): string {\n    // This core belongs to the project template, so we can hardcode the\n    // location of this file relative to the project root, and the scaffold\n    // location defined in the project's composer.json.\n    return dirname(__DIR__, 3) . '/web';\n  }\n\n}\n"
  },
  {
    "path": "src/drush-commands-core-development/12/DevelopmentProjectCommands.php",
    "content": "<?php\n\nnamespace Drush\\Commands\\core_development;\n\nuse Composer\\Autoload\\ClassLoader;\nuse Drupal\\Core\\DrupalKernel;\nuse Drupal\\Core\\Site\\Settings;\nuse Drush\\Commands\\DrushCommands;\nuse Drush\\Drush;\nuse Psr\\Container\\ContainerInterface as DrushContainer;\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n/**\n * Replaces the cache:rebuild command to correctly work with symlinked Drupal.\n *\n * This prevents contrib modules from vanishing when the cache:rebuild command\n * is run.\n *\n * For maintainability, changes from the original command method in\n * Drush\\Commands\\core\\CacheCommands are marked 'CHANGE'.\n */\nclass DevelopmentProjectCommands extends DrushCommands {\n\n  public function __construct(\n    private ClassLoader $autoloader\n  ) {\n    parent::__construct();\n  }\n\n  public static function createEarly(DrushContainer $drush_container): self {\n    $commandHandler = new static(\n        $drush_container->get('loader')\n    );\n\n    return $commandHandler;\n  }\n\n  /**\n   * @hook replace-command cache:rebuild\n   */\n  public function rebuild($options = ['cache-clear' => true]) {\n    if (!$options['cache-clear']) {\n      $this->logger()->info(dt(\"Skipping cache-clear operation due to --no-cache-clear option.\"));\n      return true;\n    }\n\n    // CHANGE: Get the app root ourselves instead of using DRUPAL_ROOT.\n    $app_root = $this->getAppRoot();\n    chdir($this->getAppRoot());\n\n    // We no longer clear APC and similar caches as they are useless on CLI.\n    // See https://github.com/drush-ops/drush/pull/2450\n\n    require_once DRUSH_DRUPAL_CORE . '/includes/utility.inc';\n\n    $request = Drush::bootstrap()->getRequest();\n    DrupalKernel::bootEnvironment();\n\n    // Avoid 'Only variables should be passed by reference'\n    // CHANGE: Don't use DRUPAL_ROOT.\n    $root = $app_root;\n    $site_path = DrupalKernel::findSitePath($request);\n    Settings::initialize($root, $site_path, $this->autoloader);\n\n    // drupal_rebuild() calls drupal_flush_all_caches() itself, so we don't do it manually.\n    // CHANGE: call our own version of drupal_rebuild().\n    $this->drupal_rebuild($this->autoloader, $request);\n    $this->logger()->success(dt('Cache rebuild complete.'));\n  }\n\n  /**\n   * Replacement for drupal_rebuild().\n   *\n   * This passes the app root to DrupalKernel.\n   */\n  function drupal_rebuild($class_loader, Request $request) {\n    // Remove Drupal's error and exception handlers; they rely on a working\n    // service container and other subsystems and will only cause a fatal error\n    // that hides the actual error.\n    restore_error_handler();\n    restore_exception_handler();\n\n    // Invalidate the container.\n    // Bootstrap up to where caches exist and clear them.\n    // CHANGE: Pass the correct app root to DrupalKernel.\n    $kernel = new DrupalKernel('prod', $class_loader, TRUE, $this->getAppRoot());\n    $kernel->setSitePath(DrupalKernel::findSitePath($request));\n    $kernel->invalidateContainer();\n    $kernel->boot();\n    $kernel->preHandle($request);\n    // Ensure our request includes the session if appropriate.\n    if (PHP_SAPI !== 'cli') {\n      $request->setSession($kernel->getContainer()->get('session'));\n    }\n\n    drupal_flush_all_caches($kernel);\n\n    // Disable recording of cached pages.\n    \\Drupal::service('page_cache_kill_switch')->trigger();\n\n    // Restore Drupal's error and exception handlers.\n    // @see \\Drupal\\Core\\DrupalKernel::boot()\n    set_error_handler('_drupal_error_handler');\n    set_exception_handler('_drupal_exception_handler');\n  }\n\n  /**\n   * Gets the app root.\n   *\n   * @return string\n   *   The app root.\n   */\n  protected function getAppRoot(): string {\n    // This core belongs to the project template, so we can hardcode the\n    // location of this file relative to the project root, and the scaffold\n    // location defined in the project's composer.json.\n    return dirname(__DIR__, 3) . '/web';\n  }\n\n}\n"
  },
  {
    "path": "src/drush-commands-core-development/13/DevelopmentProjectCommands.php",
    "content": "<?php\n\nnamespace Drush\\Commands\\core_development;\n\nuse Composer\\Autoload\\ClassLoader;\nuse Drupal\\Core\\DrupalKernel;\nuse Drupal\\Core\\Site\\Settings;\nuse Drush\\Commands\\DrushCommands;\nuse Drush\\Drush;\nuse Psr\\Container\\ContainerInterface as DrushContainer;\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n/**\n * Replaces the cache:rebuild command to correctly work with symlinked Drupal.\n *\n * This prevents contrib modules from vanishing when the cache:rebuild command\n * is run.\n *\n * For maintainability, changes from the original command method in\n * Drush\\Commands\\core\\CacheCommands are marked 'CHANGE'.\n */\nclass DevelopmentProjectCommands extends DrushCommands {\n\n  public function __construct(\n    private ClassLoader $autoloader\n  ) {\n    parent::__construct();\n  }\n\n  public static function createEarly(DrushContainer $drush_container): self {\n    $commandHandler = new static(\n        $drush_container->get('loader')\n    );\n\n    return $commandHandler;\n  }\n\n  /**\n   * @hook replace-command cache:rebuild\n   */\n  public function rebuild($options = ['cache-clear' => true]) {\n    if (!$options['cache-clear']) {\n      $this->logger()->info(dt(\"Skipping cache-clear operation due to --no-cache-clear option.\"));\n      return true;\n    }\n\n    // CHANGE: Get the app root ourselves instead of using DRUPAL_ROOT.\n    $app_root = $this->getAppRoot();\n    chdir($this->getAppRoot());\n\n    // We no longer clear APC and similar caches as they are useless on CLI.\n    // See https://github.com/drush-ops/drush/pull/2450\n\n    require_once DRUSH_DRUPAL_CORE . '/includes/utility.inc';\n\n    $request = Drush::bootstrap()->getRequest();\n    DrupalKernel::bootEnvironment();\n\n    // Avoid 'Only variables should be passed by reference'\n    // CHANGE: Don't use DRUPAL_ROOT.\n    $root = $app_root;\n    $site_path = DrupalKernel::findSitePath($request);\n    Settings::initialize($root, $site_path, $this->autoloader);\n\n    // drupal_rebuild() calls drupal_flush_all_caches() itself, so we don't do it manually.\n    // CHANGE: call our own version of drupal_rebuild().\n    $this->drupal_rebuild($this->autoloader, $request);\n    $this->logger()->success(dt('Cache rebuild complete.'));\n  }\n\n  /**\n   * Replacement for drupal_rebuild().\n   *\n   * This passes the app root to DrupalKernel.\n   */\n  function drupal_rebuild($class_loader, Request $request) {\n    // Remove Drupal's error and exception handlers; they rely on a working\n    // service container and other subsystems and will only cause a fatal error\n    // that hides the actual error.\n    restore_error_handler();\n    restore_exception_handler();\n\n    // Invalidate the container.\n    // Bootstrap up to where caches exist and clear them.\n    // CHANGE: Pass the correct app root to DrupalKernel.\n    $kernel = new DrupalKernel('prod', $class_loader, TRUE, $this->getAppRoot());\n    $kernel->setSitePath(DrupalKernel::findSitePath($request));\n    $kernel->invalidateContainer();\n    $kernel->boot();\n    $kernel->preHandle($request);\n    // Ensure our request includes the session if appropriate.\n    if (PHP_SAPI !== 'cli') {\n      $request->setSession($kernel->getContainer()->get('session'));\n    }\n\n    drupal_flush_all_caches($kernel);\n\n    // Disable recording of cached pages.\n    \\Drupal::service('page_cache_kill_switch')->trigger();\n\n    // Restore Drupal's error and exception handlers.\n    // @see \\Drupal\\Core\\DrupalKernel::boot()\n    set_error_handler('_drupal_error_handler');\n    set_exception_handler('_drupal_exception_handler');\n  }\n\n  /**\n   * Gets the app root.\n   *\n   * @return string\n   *   The app root.\n   */\n  protected function getAppRoot(): string {\n    // This core belongs to the project template, so we can hardcode the\n    // location of this file relative to the project root, and the scaffold\n    // location defined in the project's composer.json.\n    return dirname(__DIR__, 3) . '/web';\n  }\n\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/.eslintrc.json",
    "content": "{\n    \"root\": true,\n    \"parser\": \"@typescript-eslint/parser\",\n    \"parserOptions\": {\n        \"ecmaVersion\": 6,\n        \"sourceType\": \"module\"\n    },\n    \"plugins\": [\n        \"@typescript-eslint\"\n    ],\n    \"rules\": {\n        \"@typescript-eslint/naming-convention\": \"warn\",\n        \"@typescript-eslint/semi\": \"warn\",\n        \"curly\": \"warn\",\n        \"eqeqeq\": \"warn\",\n        \"no-throw-literal\": \"warn\",\n        \"semi\": \"off\"\n    },\n    \"ignorePatterns\": [\n        \"out\",\n        \"dist\",\n        \"**/*.d.ts\"\n    ]\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/.vscode/extensions.json",
    "content": "{\n    // See http://go.microsoft.com/fwlink/?LinkId=827846\n    // for the documentation about the extensions.json format\n    \"recommendations\": [\n        \"dbaeumer.vscode-eslint\"\n    ]\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/.vscode/launch.json",
    "content": "// A launch configuration that compiles the extension and then opens it inside a new window\n// Use IntelliSense to learn about possible attributes.\n// Hover to view descriptions of existing attributes.\n// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Run Extension\",\n            \"type\": \"extensionHost\",\n            \"request\": \"launch\",\n            \"args\": [\n                \"--extensionDevelopmentPath=${workspaceFolder}\"\n            ],\n            \"outFiles\": [\n                \"${workspaceFolder}/out/**/*.js\"\n            ],\n            \"preLaunchTask\": \"${defaultBuildTask}\"\n        },\n        {\n            \"name\": \"Extension Tests\",\n            \"type\": \"extensionHost\",\n            \"request\": \"launch\",\n            \"args\": [\n                \"--extensionDevelopmentPath=${workspaceFolder}\",\n                \"--extensionTestsPath=${workspaceFolder}/out/test/suite/index\"\n            ],\n            \"outFiles\": [\n                \"${workspaceFolder}/out/test/**/*.js\"\n            ],\n            \"preLaunchTask\": \"${defaultBuildTask}\"\n        }\n    ]\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/.vscode/settings.json",
    "content": "// Place your settings in this file to overwrite default and user settings.\n{\n    \"files.exclude\": {\n        \"out\": false // set this to true to hide the \"out\" folder with the compiled JS files\n    },\n    \"search.exclude\": {\n        \"out\": true // set this to false to include \"out\" folder in search results\n    },\n    // Turn off tsc task auto detection since we have the necessary tasks as npm scripts\n    \"typescript.tsc.autoDetect\": \"off\",\n    \"editor.insertSpaces\": true\n}"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/.vscode/tasks.json",
    "content": "// See https://go.microsoft.com/fwlink/?LinkId=733558\n// for the documentation about the tasks.json format\n{\n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"type\": \"npm\",\n            \"script\": \"watch\",\n            \"problemMatcher\": \"$tsc-watch\",\n            \"isBackground\": true,\n            \"presentation\": {\n                \"reveal\": \"never\"\n            },\n            \"group\": {\n                \"kind\": \"build\",\n                \"isDefault\": true\n            }\n        }\n    ]\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/.vscodeignore",
    "content": ".vscode/**\n.vscode-test/**\nout/test/**\n\nsrc/**\n.gitignore\n.yarnrc\nvsc-extension-quickstart.md\n**/tsconfig.json\n**/.eslintrc.json\n**/*.map\n**/*.ts\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to the \"drupalpod-ext\" extension will be documented in this file.\n\nCheck [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.\n\n## [Unreleased]\n\n- Initial release"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/README.md",
    "content": "# DrupalPod Extension\n\nProvides a Contribution Guide for using [DrupalPod](https://github.com/shaal/DrupalPod) on startup or by using the `drupalpod.ext-start` command in the Command Palette.\n\nThe extension should be installed automatically by GitPod (once development is complete).\n\nTo prevent the Contribution Guide from displaying when you start your workspace, you can add `\"drupalpod.hideOnStartup\": true` to `.vscode/settings.json`.\n\n## Contribute\n\n* Run `yarn install`\n* Make your awesome changes and unit tests.\n* Run `yarn package` to build the VISX file in the current working directory.\n* Uninstall the extension completely from your workspace:\n    * Press the \"Extensions\" button on the left.\n    * Press the \"Manage\" button (Gear icon).\n    * Click the \"Uninstall\" option from the context menu.\n* Reload Gitpod\n* Install the extension by VISX\n    * Press the \"Extensions\" button on the left.\n    * Press the \"Views and More Actions...\" button (\"...\" icon).\n    * Click \"Install from VISX...\" option from the context menu.\n    * Browse to or provide the directory path `/workspace/DrupalPod/src/vscode-extension/drupalpod-ext/ and choose the VISX file to install.\n\n## Publish\n\nTODO: Should be done via a GitHub Action.\n\n* Update the version in package.json\n* Package a new VISX\n* Publish the VISX on OpenVsx\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/package.json",
    "content": "{\n  \"name\": \"drupalpod-ext\",\n  \"displayName\": \"DrupalPod\",\n  \"description\": \"\",\n  \"version\": \"0.0.2\",\n  \"license\": \"MIT\",\n  \"engines\": {\n    \"vscode\": \"^1.57.1\"\n  },\n  \"categories\": [\n    \"Other\"\n  ],\n  \"activationEvents\": [\n    \"onCommand:drupalpod-ext.start\",\n    \"onStartupFinished\"\n  ],\n  \"main\": \"./out/extension.js\",\n  \"contributes\": {\n    \"commands\": [\n      {\n        \"command\": \"drupalpod-ext.start\",\n        \"title\": \"Getting Started Contributing with DrupalPod\",\n        \"category\": \"Drupal\"\n      }\n    ],\n    \"configuration\": {\n      \"title\": \"DrupalPod\",\n      \"properties\": {\n        \"drupalpod.hideOnStartup\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"Hides the Drupal Contributions startup screen from appearing when DrupalPod starts.\"\n        }\n      }\n    }\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/shaal/DrupalPod\",\n    \"directory\": \"src/drupalpod-ext\"\n  },\n  \"publisher\": \"drupal-mentoring\",\n  \"scripts\": {\n    \"vscode:prepublish\": \"npm run compile\",\n    \"package\": \"vsce package\",\n    \"compile\": \"tsc -p ./\",\n    \"watch\": \"tsc -watch -p ./\",\n    \"pretest\": \"npm run compile && npm run lint\",\n    \"lint\": \"eslint src --ext ts\",\n    \"test\": \"node ./out/test/runTest.js\"\n  },\n  \"devDependencies\": {\n    \"@types/glob\": \"^7.1.3\",\n    \"@types/mocha\": \"^8.2.2\",\n    \"@types/node\": \"14.x\",\n    \"@types/vscode\": \"~1.57.1\",\n    \"@typescript-eslint/eslint-plugin\": \"^4.26.0\",\n    \"@typescript-eslint/parser\": \"^4.26.0\",\n    \"eslint\": \"^7.27.0\",\n    \"glob\": \"^7.1.7\",\n    \"mocha\": \"^8.4.0\",\n    \"ovsx\": \"^0.2.0\",\n    \"typescript\": \"^4.3.2\",\n    \"vsce\": \"^1.95.1\",\n    \"vscode-test\": \"^1.5.2\"\n  }\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/src/extension.ts",
    "content": "import * as vscode from 'vscode';\nimport { getHelpContent } from './help-content';\n\nexport async function activate(context: vscode.ExtensionContext) {\n  context.subscriptions.push(\n    vscode.commands.registerCommand('drupalpod-ext.start', () => {\n      const panel = vscode.window.createWebviewPanel(\n        'drupalpod-ext',\n        'Contribution Guide',\n        vscode.ViewColumn.One,\n        {}\n      );\n\n      panel.webview.html = getHelpContent();\n    })\n  );\n\n  const config = vscode.workspace.getConfiguration('drupalpod');\n  if (!config.has('hideOnStartup') || !config.get('hideOnStartup')) {\n    await vscode.commands.executeCommand('drupalpod-ext.start');\n  }\n}\n\n// this method is called when your extension is deactivated\nexport function deactivate() {}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/src/help-content.ts",
    "content": "\n/**\n * Provides base help content structure as a string.\n *\n * @todo refactor this when implementing a javascript tour using messages to invoke vscode commands.\n */\nexport function getHelpContent(): string {\n  return `<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initila-scale=1.0\">\n    <title>Getting Started Contributing with DrupalPod</title>\n\n    <style type=\"text/css\">\nbody {\n  font-family: sans-serif;\n  font-size: 15px;\n}\n#header,\n#main,\n#footer {\n  width: 100%;\n  margin: .5rem 0;\n}\n.footer__nav {\n  display: flex;\n  justify-content: flex-start;\n  align-items: baseline;\n}\n.emoji {\n  font-size: 20px;\n}\n.nav__link {\n  padding: .15rem .25rem;\n  margin: 0 .25rem;\n}\n    </style>\n  </head>\n  <body>\n    <div id=\"page-help\">\n      <header id=\"header\">\n        <h1>Getting Started Contributing to Drupal</h1>\n      </header>\n      <main id=\"main\">\n        <section>\n          <header>\n            <h2>Getting Started with DrupalPod</h2>\n          </header>\n          <ol class=\"list--ordered\">\n            <li><span class=\"emoji\">⬇️</span> Wait until the “Terminal” completes its operations. Drupal will open in the panel when it is complete <span class=\"emoji\">➡️</span></li>\n            <li><span class=\"emoji\">➡️</span> You can use the “Simple Browser” to use Drupal. Go ahead and install Drupal now if it is not installed.\n              <ul>\n                <li>Note: You will use <code>db</code> as the username, password, database name and host (Advanced Options).</li>\n              </ul>\n            </li>\n            <li><span class=\"emoji\">⬅️</span> Press the “Explorer” button. You can access and modify files in Drupal core and contrib by going expanding the \"repos\" directory.</li>\n            <li><span class=\"emoji\">⬅️</span> Press the “Remote Explorer” button. It shows the services provided by DrupalPod.\n              <ul>\n                <li>Find the “8080” item in the list.</li>\n                <li>Press the “Globe\" button to open Drupal in a new tab or window.</li>\n                <li>Press the “Open Preview” button to open Drupal in the Simple Browser as a panel in the editor.</li>\n              </ul>\n            </li>\n            <li><span class=\"emoji\">⬇️</span> You can use the “Terminal” below to run git, ddev and drush. But first we need to setup SSH access if you have not done so already.\n              <ul>\n                <li>Run the following command in the Terminal: <code>.gitpod/drupal/ssh/00-interactive-ssh-setup.sh</code> and then follow the instructions in the tab that appears.</li>\n              </ul>\n            </li>\n          </ol>\n        </section>\n\n        <section>\n          <header>\n            <h2>What's Next?</h2>\n          </header>\n          <ul class=\"list--unordered\">\n            <li><a href=\"https://drupal.org/user/register\">Create a drupal.org user account</a>.</li>\n            <li>Join us on <a href=\"https://drupal.org/slack\">Drupal Slack</a> in the <a href=\"https://drupal.slack.com/archives/C1BMUQ9U6\">#contribute</a> channel.</li>\n            <li>Find a <a href=\"https://www.drupal.org/community/contributor-guide/find-a-task\">Contributor Task</a> such as\n              <ul>\n                <li>Manually test an issue</li>\n                <li>Write a patch or contribute to an issue fork</li>\n                <li>Write an automated test</li>\n                <li>Run automated tests:\n                  <ul>\n                    <li>Nightwatch: <code>ddev nightwatch</code></li>\n                    <li>PHPUnit: <code>ddev phpunit</code></li>\n                  </ul>\n                </li>\n              </ul>\n            </li>\n            <li>Find your <a href=\"https://www.drupal.org/community/contributor-guide/find-your-role\">role</a> or <a href=\"https://www.drupal.org/community/contributor-guide/use-or-improve-your-skills\">skill</a> to learn more about how to contribute, or ask if anyone needs some help on an issue in #contribute.</li>\n          </ul>\n          <aside>Remember there are many <a href=\"https://www.drupal.org/community/contributor-guide/contribution-areas\">Contribution areas</a> that need your help.</aside>\n        </section>\n      </main>\n      <footer id=\"footer\">\n        <nav class=\"footer__nav\" aria-describedby=\"footerNavHeader\">\n          <strong id=\"footerNavHeader\">Helpful Links:</strong>\n          <a href=\"https://github.com/shaal/DrupalPod\" class=\"nav__link\">DrupalPod</a>\n          <a href=\"https://drupal.org/community/contributor-guide\" class=\"nav__link\">Contributor Guide</a>\n          <a href=\"https://drupal.org/project/issue/search/drupal\" class=\"nav__link\">Core Issue Queue</a>\n          <a href=\"https://drupal.org/chat\" class=\"nav__link\">Chat With the Community</a>\n        </nav>\n      </footer>\n    </div>\n  </body>\n</html>`;\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/src/test/runTest.ts",
    "content": "import * as path from 'path';\n\nimport { runTests } from 'vscode-test';\n\nasync function main() {\n    try {\n        // The folder containing the Extension Manifest package.json\n        // Passed to `--extensionDevelopmentPath`\n        const extensionDevelopmentPath = path.resolve(__dirname, '../../');\n\n        // The path to test runner\n        // Passed to --extensionTestsPath\n        const extensionTestsPath = path.resolve(__dirname, './suite/index');\n\n        // Download VS Code, unzip it and run the integration test\n        await runTests({ extensionDevelopmentPath, extensionTestsPath });\n    } catch (err) {\n        console.error('Failed to run tests');\n        process.exit(1);\n    }\n}\n\nmain();\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/src/test/suite/extension.test.ts",
    "content": "import * as assert from 'assert';\n\n// You can import and use all API from the 'vscode' module\n// as well as import your extension to test it\nimport * as vscode from 'vscode';\n// import * as myExtension from '../../extension';\n\nsuite('Extension Test Suite', () => {\n  vscode.window.showInformationMessage('Start all tests.');\n\n  test('Sample test', () => {\n    assert.strictEqual(-1, [1, 2, 3].indexOf(5));\n    assert.strictEqual(-1, [1, 2, 3].indexOf(0));\n  });\n});\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/src/test/suite/index.ts",
    "content": "import * as path from 'path';\nimport * as Mocha from 'mocha';\nimport * as glob from 'glob';\n\nexport function run(): Promise<void> {\n    // Create the mocha test\n    const mocha = new Mocha({\n        ui: 'tdd',\n        color: true\n    });\n\n    const testsRoot = path.resolve(__dirname, '..');\n\n    return new Promise((c, e) => {\n        glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {\n            if (err) {\n                return e(err);\n            }\n\n            // Add files to the test suite\n            files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));\n\n            try {\n                // Run the mocha test\n                mocha.run(failures => {\n                    if (failures > 0) {\n                        e(new Error(`${failures} tests failed.`));\n                    } else {\n                        c();\n                    }\n                });\n            } catch (err) {\n                console.error(err);\n                e(err);\n            }\n        });\n    });\n}\n"
  },
  {
    "path": "src/vscode-extension/drupalpod-ext/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"module\": \"commonjs\",\n        \"target\": \"es6\",\n        \"outDir\": \"out\",\n        \"lib\": [\n            \"es6\"\n        ],\n        \"sourceMap\": true,\n        \"rootDir\": \"src\",\n        \"strict\": true   /* enable all strict type-checking options */\n        /* Additional Checks */\n        // \"noImplicitReturns\": true, /* Report error when not all code paths in function return a value. */\n        // \"noFallthroughCasesInSwitch\": true, /* Report errors for fallthrough cases in switch statement. */\n        // \"noUnusedParameters\": true,  /* Report errors on unused parameters. */\n    },\n    \"exclude\": [\n        \"node_modules\",\n        \".vscode-test\"\n    ]\n}\n"
  }
]