From 9d66961bbc14b9f0d5bbb56fc04c56e0a5a23453 Mon Sep 17 00:00:00 2001 From: Kama Date: Fri, 29 Sep 2023 06:54:06 +0500 Subject: [PATCH] Check no-content urls. Refactoring. --- .github/workflows/update-repo.yml | 2 +- Makefile | 19 +- repo/no-content/packages.json | 1224 ----------------------------- repo/packages.json | 1224 ----------------------------- run.php | 24 + run/check.php | 36 + run/update.php | 15 + src/ApiClient.php | 33 - src/ApiWorker.php | 48 -- src/RepoItemGenerator.php | 25 +- src/RepoTypes.php | 6 +- src/RepoUpdater.php | 8 +- src/WporgApiClient.php | 74 ++ update.php | 23 - 14 files changed, 183 insertions(+), 2578 deletions(-) create mode 100644 run.php create mode 100644 run/check.php create mode 100644 run/update.php delete mode 100644 src/ApiClient.php delete mode 100644 src/ApiWorker.php create mode 100644 src/WporgApiClient.php delete mode 100644 update.php diff --git a/.github/workflows/update-repo.yml b/.github/workflows/update-repo.yml index ded2d29..4ad5679 100644 --- a/.github/workflows/update-repo.yml +++ b/.github/workflows/update-repo.yml @@ -21,7 +21,7 @@ jobs: - run: composer install --no-interaction --no-dev - name: Update packages.json repo file run: | - php update.php + php run.php update if [ $? -eq 0 ]; then if git status | grep -q "nothing to commit"; then diff --git a/Makefile b/Makefile index 0975432..df90daf 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,23 @@ container=WP_COMPOSER_REPO_php image=wp_composer_repo_php +# scripts + +update_repo: + -docker stop $(container) && sleep 1 + docker run --rm -it --name $(container) -v ./:/var/www/app $(image) php run.php update + +check_urls: + -docker stop $(container) && sleep 1 + docker run --rm -it --name $(container) -v ./:/var/www/app $(image) php run.php check + +# docker + build: docker build --tag $(image) . -generate: - docker run --rm -d -v ./:/var/www/app --name $(container) $(image) php update.php - -run: - docker run --rm -d -v ./:/var/www/app --name $(container) $(image) sleep infinity +run_container: + docker run --rm -d --name $(container) -v ./:/var/www/app $(image) sleep infinity make connect connect: diff --git a/repo/no-content/packages.json b/repo/no-content/packages.json index b51e16b..0d3ec1a 100644 --- a/repo/no-content/packages.json +++ b/repo/no-content/packages.json @@ -4122,1230 +4122,6 @@ "url": "https://downloads.wordpress.org/release/wordpress-4.0.1-no-content.zip", "type": "zip" } - }, - "4.0": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "4.0", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-4.0-no-content.zip", - "type": "zip" - } - }, - "3.9.40": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.40", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.40-no-content.zip", - "type": "zip" - } - }, - "3.9.39": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.39", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.39-no-content.zip", - "type": "zip" - } - }, - "3.9.37": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.37", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.37-no-content.zip", - "type": "zip" - } - }, - "3.9.36": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.36", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.36-no-content.zip", - "type": "zip" - } - }, - "3.9.35": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.35", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.35-no-content.zip", - "type": "zip" - } - }, - "3.9.34": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.34", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.34-no-content.zip", - "type": "zip" - } - }, - "3.9.33": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.33", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.33-no-content.zip", - "type": "zip" - } - }, - "3.9.32": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.32", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.32-no-content.zip", - "type": "zip" - } - }, - "3.9.31": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.31", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.31-no-content.zip", - "type": "zip" - } - }, - "3.9.30": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.30", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.30-no-content.zip", - "type": "zip" - } - }, - "3.9.29": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.29", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.29-no-content.zip", - "type": "zip" - } - }, - "3.9.28": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.28", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.28-no-content.zip", - "type": "zip" - } - }, - "3.9.27": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.27", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.27-no-content.zip", - "type": "zip" - } - }, - "3.9.26": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.26", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.26-no-content.zip", - "type": "zip" - } - }, - "3.9.25": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.25", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.25-no-content.zip", - "type": "zip" - } - }, - "3.9.24": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.24", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.24-no-content.zip", - "type": "zip" - } - }, - "3.9.23": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.23", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.23-no-content.zip", - "type": "zip" - } - }, - "3.9.22": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.22", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.22-no-content.zip", - "type": "zip" - } - }, - "3.9.21": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.21", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.21-no-content.zip", - "type": "zip" - } - }, - "3.9.20": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.20", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.20-no-content.zip", - "type": "zip" - } - }, - "3.9.19": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.19", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.19-no-content.zip", - "type": "zip" - } - }, - "3.9.18": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.18", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.18-no-content.zip", - "type": "zip" - } - }, - "3.9.17": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.17", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.17-no-content.zip", - "type": "zip" - } - }, - "3.9.16": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.16", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.16-no-content.zip", - "type": "zip" - } - }, - "3.9.15": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.15", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.15-no-content.zip", - "type": "zip" - } - }, - "3.9.14": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.14", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.14-no-content.zip", - "type": "zip" - } - }, - "3.9.13": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.13", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.13-no-content.zip", - "type": "zip" - } - }, - "3.9.12": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.12", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.12-no-content.zip", - "type": "zip" - } - }, - "3.9.11": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.11", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.11-no-content.zip", - "type": "zip" - } - }, - "3.9.10": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.10", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.10-no-content.zip", - "type": "zip" - } - }, - "3.9.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.9-no-content.zip", - "type": "zip" - } - }, - "3.9.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.8-no-content.zip", - "type": "zip" - } - }, - "3.9.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.7-no-content.zip", - "type": "zip" - } - }, - "3.9.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.6-no-content.zip", - "type": "zip" - } - }, - "3.9.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.5-no-content.zip", - "type": "zip" - } - }, - "3.9.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.4-no-content.zip", - "type": "zip" - } - }, - "3.9.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.3-no-content.zip", - "type": "zip" - } - }, - "3.9.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.2-no-content.zip", - "type": "zip" - } - }, - "3.9.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.1-no-content.zip", - "type": "zip" - } - }, - "3.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9-no-content.zip", - "type": "zip" - } - }, - "3.8.41": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.41", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.41-no-content.zip", - "type": "zip" - } - }, - "3.8.40": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.40", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.40-no-content.zip", - "type": "zip" - } - }, - "3.8.39": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.39", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.39-no-content.zip", - "type": "zip" - } - }, - "3.8.38": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.38", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.38-no-content.zip", - "type": "zip" - } - }, - "3.8.37": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.37", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.37-no-content.zip", - "type": "zip" - } - }, - "3.8.36": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.36", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.36-no-content.zip", - "type": "zip" - } - }, - "3.8.35": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.35", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.35-no-content.zip", - "type": "zip" - } - }, - "3.8.34": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.34", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.34-no-content.zip", - "type": "zip" - } - }, - "3.8.33": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.33", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.33-no-content.zip", - "type": "zip" - } - }, - "3.8.32": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.32", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.32-no-content.zip", - "type": "zip" - } - }, - "3.8.31": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.31", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.31-no-content.zip", - "type": "zip" - } - }, - "3.8.30": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.30", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.30-no-content.zip", - "type": "zip" - } - }, - "3.8.29": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.29", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.29-no-content.zip", - "type": "zip" - } - }, - "3.8.28": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.28", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.28-no-content.zip", - "type": "zip" - } - }, - "3.8.27": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.27", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.27-no-content.zip", - "type": "zip" - } - }, - "3.8.26": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.26", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.26-no-content.zip", - "type": "zip" - } - }, - "3.8.25": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.25", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.25-no-content.zip", - "type": "zip" - } - }, - "3.8.24": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.24", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.24-no-content.zip", - "type": "zip" - } - }, - "3.8.23": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.23", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.23-no-content.zip", - "type": "zip" - } - }, - "3.8.22": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.22", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.22-no-content.zip", - "type": "zip" - } - }, - "3.8.21": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.21", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.21-no-content.zip", - "type": "zip" - } - }, - "3.8.20": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.20", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.20-no-content.zip", - "type": "zip" - } - }, - "3.8.19": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.19", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.19-no-content.zip", - "type": "zip" - } - }, - "3.8.18": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.18", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.18-no-content.zip", - "type": "zip" - } - }, - "3.8.17": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.17", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.17-no-content.zip", - "type": "zip" - } - }, - "3.8.16": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.16", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.16-no-content.zip", - "type": "zip" - } - }, - "3.8.15": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.15", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.15-no-content.zip", - "type": "zip" - } - }, - "3.8.14": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.14", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.14-no-content.zip", - "type": "zip" - } - }, - "3.8.13": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.13", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.13-no-content.zip", - "type": "zip" - } - }, - "3.8.12": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.12", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.12-no-content.zip", - "type": "zip" - } - }, - "3.8.11": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.11", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.11-no-content.zip", - "type": "zip" - } - }, - "3.8.10": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.10", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.10-no-content.zip", - "type": "zip" - } - }, - "3.8.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.9-no-content.zip", - "type": "zip" - } - }, - "3.8.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.8-no-content.zip", - "type": "zip" - } - }, - "3.8.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.7-no-content.zip", - "type": "zip" - } - }, - "3.8.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.6-no-content.zip", - "type": "zip" - } - }, - "3.8.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.5-no-content.zip", - "type": "zip" - } - }, - "3.8.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.4-no-content.zip", - "type": "zip" - } - }, - "3.8.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.3-no-content.zip", - "type": "zip" - } - }, - "3.8.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.2-no-content.zip", - "type": "zip" - } - }, - "3.8.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.1-no-content.zip", - "type": "zip" - } - }, - "3.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8-no-content.zip", - "type": "zip" - } - }, - "3.7.41": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.41", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.41-no-content.zip", - "type": "zip" - } - }, - "3.7.40": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.40", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.40-no-content.zip", - "type": "zip" - } - }, - "3.7.39": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.39", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.39-no-content.zip", - "type": "zip" - } - }, - "3.7.38": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.38", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.38-no-content.zip", - "type": "zip" - } - }, - "3.7.37": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.37", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.37-no-content.zip", - "type": "zip" - } - }, - "3.7.36": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.36", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.36-no-content.zip", - "type": "zip" - } - }, - "3.7.35": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.35", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.35-no-content.zip", - "type": "zip" - } - }, - "3.7.34": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.34", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.34-no-content.zip", - "type": "zip" - } - }, - "3.7.33": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.33", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.33-no-content.zip", - "type": "zip" - } - }, - "3.7.32": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.32", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.32-no-content.zip", - "type": "zip" - } - }, - "3.7.31": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.31", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.31-no-content.zip", - "type": "zip" - } - }, - "3.7.30": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.30", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.30-no-content.zip", - "type": "zip" - } - }, - "3.7.29": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.29", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.29-no-content.zip", - "type": "zip" - } - }, - "3.7.28": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.28", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.28-no-content.zip", - "type": "zip" - } - }, - "3.7.27": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.27", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.27-no-content.zip", - "type": "zip" - } - }, - "3.7.26": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.26", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.26-no-content.zip", - "type": "zip" - } - }, - "3.7.25": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.25", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.25-no-content.zip", - "type": "zip" - } - }, - "3.7.24": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.24", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.24-no-content.zip", - "type": "zip" - } - }, - "3.7.23": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.23", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.23-no-content.zip", - "type": "zip" - } - }, - "3.7.22": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.22", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.22-no-content.zip", - "type": "zip" - } - }, - "3.7.21": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.21", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.21-no-content.zip", - "type": "zip" - } - }, - "3.7.20": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.20", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.20-no-content.zip", - "type": "zip" - } - }, - "3.7.19": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.19", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.19-no-content.zip", - "type": "zip" - } - }, - "3.7.18": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.18", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.18-no-content.zip", - "type": "zip" - } - }, - "3.7.17": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.17", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.17-no-content.zip", - "type": "zip" - } - }, - "3.7.16": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.16", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.16-no-content.zip", - "type": "zip" - } - }, - "3.7.15": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.15", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.15-no-content.zip", - "type": "zip" - } - }, - "3.7.14": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.14", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.14-no-content.zip", - "type": "zip" - } - }, - "3.7.13": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.13", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.13-no-content.zip", - "type": "zip" - } - }, - "3.7.12": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.12", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.12-no-content.zip", - "type": "zip" - } - }, - "3.7.11": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.11", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.11-no-content.zip", - "type": "zip" - } - }, - "3.7.10": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.10", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.10-no-content.zip", - "type": "zip" - } - }, - "3.7.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.9-no-content.zip", - "type": "zip" - } - }, - "3.7.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.8-no-content.zip", - "type": "zip" - } - }, - "3.7.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.7-no-content.zip", - "type": "zip" - } - }, - "3.7.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.6-no-content.zip", - "type": "zip" - } - }, - "3.7.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.5-no-content.zip", - "type": "zip" - } - }, - "3.7.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.4-no-content.zip", - "type": "zip" - } - }, - "3.7.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.3-no-content.zip", - "type": "zip" - } - }, - "3.7.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.2-no-content.zip", - "type": "zip" - } - }, - "3.7.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.1-no-content.zip", - "type": "zip" - } - }, - "3.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7-no-content.zip", - "type": "zip" - } - }, - "3.6.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.6.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.6.1-no-content.zip", - "type": "zip" - } - }, - "3.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.6-no-content.zip", - "type": "zip" - } - }, - "3.5.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.5.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.5.2-no-content.zip", - "type": "zip" - } - }, - "3.5.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.5.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.5.1-no-content.zip", - "type": "zip" - } - }, - "3.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.5-no-content.zip", - "type": "zip" - } - }, - "3.4.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.4.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.4.2-no-content.zip", - "type": "zip" - } - }, - "3.4.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.4.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.4.1-no-content.zip", - "type": "zip" - } - }, - "3.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.4-no-content.zip", - "type": "zip" - } - }, - "3.3.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.3.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.3.3-no-content.zip", - "type": "zip" - } - }, - "3.3.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.3.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.3.2-no-content.zip", - "type": "zip" - } - }, - "3.3.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.3.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.3.1-no-content.zip", - "type": "zip" - } } } } diff --git a/repo/packages.json b/repo/packages.json index e0d1a27..9bb9c23 100644 --- a/repo/packages.json +++ b/repo/packages.json @@ -4131,1230 +4131,6 @@ "url": "https://downloads.wordpress.org/release/wordpress-4.0.1.zip", "type": "zip" } - }, - "4.0": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "4.0", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-4.0.zip", - "type": "zip" - } - }, - "3.9.40": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.40", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.40.zip", - "type": "zip" - } - }, - "3.9.39": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.39", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.39.zip", - "type": "zip" - } - }, - "3.9.37": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.37", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.37.zip", - "type": "zip" - } - }, - "3.9.36": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.36", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.36.zip", - "type": "zip" - } - }, - "3.9.35": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.35", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.35.zip", - "type": "zip" - } - }, - "3.9.34": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.34", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.34.zip", - "type": "zip" - } - }, - "3.9.33": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.33", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.33.zip", - "type": "zip" - } - }, - "3.9.32": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.32", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.32.zip", - "type": "zip" - } - }, - "3.9.31": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.31", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.31.zip", - "type": "zip" - } - }, - "3.9.30": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.30", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.30.zip", - "type": "zip" - } - }, - "3.9.29": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.29", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.29.zip", - "type": "zip" - } - }, - "3.9.28": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.28", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.28.zip", - "type": "zip" - } - }, - "3.9.27": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.27", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.27.zip", - "type": "zip" - } - }, - "3.9.26": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.26", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.26.zip", - "type": "zip" - } - }, - "3.9.25": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.25", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.25.zip", - "type": "zip" - } - }, - "3.9.24": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.24", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.24.zip", - "type": "zip" - } - }, - "3.9.23": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.23", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.23.zip", - "type": "zip" - } - }, - "3.9.22": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.22", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.22.zip", - "type": "zip" - } - }, - "3.9.21": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.21", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.21.zip", - "type": "zip" - } - }, - "3.9.20": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.20", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.20.zip", - "type": "zip" - } - }, - "3.9.19": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.19", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.19.zip", - "type": "zip" - } - }, - "3.9.18": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.18", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.18.zip", - "type": "zip" - } - }, - "3.9.17": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.17", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.17.zip", - "type": "zip" - } - }, - "3.9.16": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.16", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.16.zip", - "type": "zip" - } - }, - "3.9.15": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.15", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.15.zip", - "type": "zip" - } - }, - "3.9.14": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.14", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.14.zip", - "type": "zip" - } - }, - "3.9.13": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.13", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.13.zip", - "type": "zip" - } - }, - "3.9.12": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.12", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.12.zip", - "type": "zip" - } - }, - "3.9.11": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.11", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.11.zip", - "type": "zip" - } - }, - "3.9.10": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.10", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.10.zip", - "type": "zip" - } - }, - "3.9.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.9.zip", - "type": "zip" - } - }, - "3.9.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.8.zip", - "type": "zip" - } - }, - "3.9.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.7.zip", - "type": "zip" - } - }, - "3.9.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.6.zip", - "type": "zip" - } - }, - "3.9.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.5.zip", - "type": "zip" - } - }, - "3.9.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.4.zip", - "type": "zip" - } - }, - "3.9.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.3.zip", - "type": "zip" - } - }, - "3.9.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.2.zip", - "type": "zip" - } - }, - "3.9.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.1.zip", - "type": "zip" - } - }, - "3.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.9.zip", - "type": "zip" - } - }, - "3.8.41": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.41", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.41.zip", - "type": "zip" - } - }, - "3.8.40": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.40", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.40.zip", - "type": "zip" - } - }, - "3.8.39": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.39", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.39.zip", - "type": "zip" - } - }, - "3.8.38": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.38", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.38.zip", - "type": "zip" - } - }, - "3.8.37": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.37", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.37.zip", - "type": "zip" - } - }, - "3.8.36": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.36", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.36.zip", - "type": "zip" - } - }, - "3.8.35": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.35", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.35.zip", - "type": "zip" - } - }, - "3.8.34": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.34", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.34.zip", - "type": "zip" - } - }, - "3.8.33": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.33", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.33.zip", - "type": "zip" - } - }, - "3.8.32": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.32", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.32.zip", - "type": "zip" - } - }, - "3.8.31": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.31", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.31.zip", - "type": "zip" - } - }, - "3.8.30": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.30", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.30.zip", - "type": "zip" - } - }, - "3.8.29": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.29", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.29.zip", - "type": "zip" - } - }, - "3.8.28": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.28", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.28.zip", - "type": "zip" - } - }, - "3.8.27": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.27", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.27.zip", - "type": "zip" - } - }, - "3.8.26": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.26", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.26.zip", - "type": "zip" - } - }, - "3.8.25": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.25", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.25.zip", - "type": "zip" - } - }, - "3.8.24": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.24", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.24.zip", - "type": "zip" - } - }, - "3.8.23": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.23", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.23.zip", - "type": "zip" - } - }, - "3.8.22": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.22", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.22.zip", - "type": "zip" - } - }, - "3.8.21": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.21", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.21.zip", - "type": "zip" - } - }, - "3.8.20": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.20", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.20.zip", - "type": "zip" - } - }, - "3.8.19": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.19", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.19.zip", - "type": "zip" - } - }, - "3.8.18": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.18", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.18.zip", - "type": "zip" - } - }, - "3.8.17": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.17", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.17.zip", - "type": "zip" - } - }, - "3.8.16": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.16", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.16.zip", - "type": "zip" - } - }, - "3.8.15": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.15", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.15.zip", - "type": "zip" - } - }, - "3.8.14": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.14", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.14.zip", - "type": "zip" - } - }, - "3.8.13": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.13", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.13.zip", - "type": "zip" - } - }, - "3.8.12": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.12", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.12.zip", - "type": "zip" - } - }, - "3.8.11": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.11", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.11.zip", - "type": "zip" - } - }, - "3.8.10": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.10", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.10.zip", - "type": "zip" - } - }, - "3.8.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.9.zip", - "type": "zip" - } - }, - "3.8.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.8.zip", - "type": "zip" - } - }, - "3.8.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.7.zip", - "type": "zip" - } - }, - "3.8.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.6.zip", - "type": "zip" - } - }, - "3.8.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.5.zip", - "type": "zip" - } - }, - "3.8.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.4.zip", - "type": "zip" - } - }, - "3.8.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.3.zip", - "type": "zip" - } - }, - "3.8.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.2.zip", - "type": "zip" - } - }, - "3.8.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.1.zip", - "type": "zip" - } - }, - "3.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.8.zip", - "type": "zip" - } - }, - "3.7.41": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.41", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.41.zip", - "type": "zip" - } - }, - "3.7.40": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.40", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.40.zip", - "type": "zip" - } - }, - "3.7.39": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.39", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.39.zip", - "type": "zip" - } - }, - "3.7.38": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.38", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.38.zip", - "type": "zip" - } - }, - "3.7.37": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.37", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.37.zip", - "type": "zip" - } - }, - "3.7.36": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.36", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.36.zip", - "type": "zip" - } - }, - "3.7.35": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.35", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.35.zip", - "type": "zip" - } - }, - "3.7.34": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.34", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.34.zip", - "type": "zip" - } - }, - "3.7.33": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.33", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.33.zip", - "type": "zip" - } - }, - "3.7.32": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.32", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.32.zip", - "type": "zip" - } - }, - "3.7.31": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.31", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.31.zip", - "type": "zip" - } - }, - "3.7.30": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.30", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.30.zip", - "type": "zip" - } - }, - "3.7.29": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.29", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.29.zip", - "type": "zip" - } - }, - "3.7.28": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.28", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.28.zip", - "type": "zip" - } - }, - "3.7.27": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.27", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.27.zip", - "type": "zip" - } - }, - "3.7.26": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.26", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.26.zip", - "type": "zip" - } - }, - "3.7.25": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.25", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.25.zip", - "type": "zip" - } - }, - "3.7.24": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.24", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.24.zip", - "type": "zip" - } - }, - "3.7.23": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.23", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.23.zip", - "type": "zip" - } - }, - "3.7.22": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.22", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.22.zip", - "type": "zip" - } - }, - "3.7.21": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.21", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.21.zip", - "type": "zip" - } - }, - "3.7.20": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.20", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.20.zip", - "type": "zip" - } - }, - "3.7.19": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.19", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.19.zip", - "type": "zip" - } - }, - "3.7.18": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.18", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.18.zip", - "type": "zip" - } - }, - "3.7.17": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.17", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.17.zip", - "type": "zip" - } - }, - "3.7.16": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.16", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.16.zip", - "type": "zip" - } - }, - "3.7.15": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.15", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.15.zip", - "type": "zip" - } - }, - "3.7.14": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.14", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.14.zip", - "type": "zip" - } - }, - "3.7.13": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.13", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.13.zip", - "type": "zip" - } - }, - "3.7.12": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.12", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.12.zip", - "type": "zip" - } - }, - "3.7.11": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.11", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.11.zip", - "type": "zip" - } - }, - "3.7.10": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.10", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.10.zip", - "type": "zip" - } - }, - "3.7.9": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.9", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.9.zip", - "type": "zip" - } - }, - "3.7.8": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.8", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.8.zip", - "type": "zip" - } - }, - "3.7.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.7.zip", - "type": "zip" - } - }, - "3.7.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.6.zip", - "type": "zip" - } - }, - "3.7.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.5.zip", - "type": "zip" - } - }, - "3.7.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.4.zip", - "type": "zip" - } - }, - "3.7.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.3.zip", - "type": "zip" - } - }, - "3.7.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.2.zip", - "type": "zip" - } - }, - "3.7.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.1.zip", - "type": "zip" - } - }, - "3.7": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.7", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.7.zip", - "type": "zip" - } - }, - "3.6.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.6.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.6.1.zip", - "type": "zip" - } - }, - "3.6": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.6", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.6.zip", - "type": "zip" - } - }, - "3.5.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.5.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.5.2.zip", - "type": "zip" - } - }, - "3.5.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.5.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.5.1.zip", - "type": "zip" - } - }, - "3.5": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.5", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.5.zip", - "type": "zip" - } - }, - "3.4.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.4.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.4.2.zip", - "type": "zip" - } - }, - "3.4.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.4.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.4.1.zip", - "type": "zip" - } - }, - "3.4": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.4", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.4.zip", - "type": "zip" - } - }, - "3.3.3": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.3.3", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.3.3.zip", - "type": "zip" - } - }, - "3.3.2": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.3.2", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.3.2.zip", - "type": "zip" - } - }, - "3.3.1": { - "name": "wordpress/wordpress", - "type": "wordpress-dropin", - "version": "3.3.1", - "dist": { - "url": "https://downloads.wordpress.org/release/wordpress-3.3.1.zip", - "type": "zip" - } } } } diff --git a/run.php b/run.php new file mode 100644 index 0000000..7925e82 --- /dev/null +++ b/run.php @@ -0,0 +1,24 @@ + require ROOT_DIR . '/run/check.php', + 'update' => require ROOT_DIR . '/run/update.php', + default => throw new \RuntimeException('Set action. One of: `check`, `update`.') + }; +} catch (\Throwable $ex) { + echo "{$ex->getMessage()} File: {$ex->getFile()}:{$ex->getLine()}. Trace: {$ex->getTraceAsString()}\n"; + + exit(1); +} diff --git a/run/check.php b/run/check.php new file mode 100644 index 0000000..fe63a97 --- /dev/null +++ b/run/check.php @@ -0,0 +1,36 @@ +getAllVersions() as $ver) { + $item = new RepoItemGenerator(RepoTypes::noContent, $ver); + $url = $item->url(); + + match ($api->isUrlAvailable($url)) { + true => $goodUrls[] = $url, + false => $badUrls[] = $url, + }; +} + +echo "Bad Urls:\n"; +/** @noinspection ForgottenDebugOutputInspection */ +print_r($badUrls); + +echo "Good Urls:\n"; +/** @noinspection ForgottenDebugOutputInspection */ +print_r($goodUrls); + + +if ($badUrls) { + exit(1); +} diff --git a/run/update.php b/run/update.php new file mode 100644 index 0000000..f1df7b5 --- /dev/null +++ b/run/update.php @@ -0,0 +1,15 @@ +getAllVersions(); + +foreach (RepoTypes::cases() as $repoType) { + $repo = new RepoDataGenerator($allVersions, $repoType); + $repoJson = $repo->generate()->toJson(); + + $updater = new RepoUpdater($repoType); + $updater->saveToFile($repoJson); +} + diff --git a/src/ApiClient.php b/src/ApiClient.php deleted file mode 100644 index eb53367..0000000 --- a/src/ApiClient.php +++ /dev/null @@ -1,33 +0,0 @@ -client->request('GET', $url); - - if (200 !== $res->getStatusCode()) { - throw new \RuntimeException( - sprintf('Bad status code: %s.', $res->getStatusCode()) - ); - } - - return json_decode($res->getBody(), false, 512, JSON_THROW_ON_ERROR); - } -} diff --git a/src/ApiWorker.php b/src/ApiWorker.php deleted file mode 100644 index aa90934..0000000 --- a/src/ApiWorker.php +++ /dev/null @@ -1,48 +0,0 @@ -api->get(self::ALL_VERS_API_URL); - $allVers = array_keys($allVers); - $allVers = array_filter($allVers, static fn($ver) => version_compare($ver, self::LOWEST_VERSION, '>=')); - - return $allVers; - } - - /** - * @throws \Throwable - */ - public function getVersionsData(): array - { - if (empty($this->versionsData)) { - $this->versionsData = $this->api->get(self::LAST_VERS_API_URL)->offers; - } - - return $this->versionsData; - } - -} diff --git a/src/RepoItemGenerator.php b/src/RepoItemGenerator.php index 11a4fc0..6c453ba 100644 --- a/src/RepoItemGenerator.php +++ b/src/RepoItemGenerator.php @@ -18,25 +18,31 @@ public function __construct( public function generateItem(): array { - $url = ($this->repoType === RepoTypes::noContent) ? $this->noContentUrl() : $this->url(); - return [ 'name' => RepoDataGenerator::PACKAGE_NAME, 'type' => RepoDataGenerator::PACKAGE_TYPE, 'version' => $this->version, 'dist' => [ - 'url' => $url, + 'url' => $this->url(), 'type' => $this->archiveType(), ] ]; } - private function isDevMasterVersion(): bool + public function url(): string { - return 'dev-master' === $this->version; + return ($this->repoType === RepoTypes::noContent) ? $this->noContentUrl() : $this->fullUrl(); + } + + public function archiveType(): string + { + $url = explode('?', $this->url())[0]; + preg_match('~\.([^.]+)$~', $url, $match); + + return $match[1] ?? 'zip'; } - private function url(): string + private function fullUrl(): string { if ($this->isDevMasterVersion()) { return self::DEV_MASTER_URL; @@ -54,11 +60,8 @@ private function noContentUrl(): string return str_replace('{VERSION}', $this->version, self::NO_CONTENT_URL_PATT); } - private function archiveType(): string + private function isDevMasterVersion(): bool { - $url = explode('?', $this->url())[0]; - preg_match('~\.([^.]+)$~', $url, $match); - - return $match[1] ?? 'zip'; + return 'dev-master' === $this->version; } } diff --git a/src/RepoTypes.php b/src/RepoTypes.php index 57dae32..83abb6a 100644 --- a/src/RepoTypes.php +++ b/src/RepoTypes.php @@ -2,8 +2,8 @@ namespace Repo; -enum RepoTypes +enum RepoTypes: string { - case full; - case noContent; + case full = 'repo'; + case noContent = 'repo/no-content'; } diff --git a/src/RepoUpdater.php b/src/RepoUpdater.php index 4eb7cf3..bfabe2b 100644 --- a/src/RepoUpdater.php +++ b/src/RepoUpdater.php @@ -16,15 +16,11 @@ public function __construct( public function setSaveFilePath(): void { - // TODO extract __DIR__ out of here - $this->saveFilePath = match ($this->repoType->name) { - RepoTypes::full->name => dirname(__DIR__) . '/repo/' . self::FILE_NAME, - RepoTypes::noContent->name => dirname(__DIR__) . '/repo/no-content/' . self::FILE_NAME, - }; + $this->saveFilePath = sprintf('%s/%s/%s', ROOT_DIR, $this->repoType->value, self::FILE_NAME); if (!is_writable($this->saveFilePath)) { throw new \RuntimeException( - sprintf('Repo dir is not exists or is not writeable: %s', $this->saveFilePath) + sprintf('Repo file is not exists or is not writeable: %s', $this->saveFilePath) ); } } diff --git a/src/WporgApiClient.php b/src/WporgApiClient.php new file mode 100644 index 0000000..b3aa149 --- /dev/null +++ b/src/WporgApiClient.php @@ -0,0 +1,74 @@ +httpGet(self::ALL_VERS_API_URL); + $allVers = array_keys($allVers); + $allVers = array_filter($allVers, static fn($ver) => version_compare($ver, self::LOWEST_VERSION, '>=')); + + return $allVers; + } + + /** + * @throws \Throwable + */ + public function getVersionsData(): array + { + if (empty($this->versionsData)) { + $this->versionsData = $this->httpGet(self::LAST_VERS_API_URL)->offers; + } + + return $this->versionsData; + } + + public function isUrlAvailable(string $url): bool + { + try { + $resp = $this->http->head($url); + } catch (\Throwable $ex) { + return false; + } + + return 200 === $resp->getStatusCode(); + } + + /** + * @throws \Throwable + */ + private function httpGet(string $url): object + { + $res = $this->http->get($url); + + if (200 !== $res->getStatusCode()) { + throw new \RuntimeException( + sprintf('Bad status code: %s.', $res->getStatusCode()) + ); + } + + return json_decode($res->getBody(), false, 512, JSON_THROW_ON_ERROR); + } +} diff --git a/update.php b/update.php deleted file mode 100644 index 0cd3e86..0000000 --- a/update.php +++ /dev/null @@ -1,23 +0,0 @@ -getAllVersions(); - - foreach (RepoTypes::cases() as $repoType) { - $repo = new RepoDataGenerator($allVersions, $repoType); - $repoJson = $repo->generate()->toJson(); - - $updater = new RepoUpdater($repoType); - $updater->saveToFile($repoJson); - } -} catch (\Throwable $ex) { - $trace = $ex->getTraceAsString(); - echo "{$ex->getMessage()} File: {$ex->getFile()}:{$ex->getLine()}. Trace: $trace\n"; - - exit(1); -}