From b5f8d0709ccf62bae47f43c0de2f57e38c7260b5 Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Wed, 24 Jul 2024 10:48:23 -0700 Subject: [PATCH] Removed `nextbuilds` subfolder, added install Removed `nextbuilds` subfolder, added composer install --- api/composer.json | 10 +- api/composer.lock | 117 +++++----- api/plugins/nextbuilds/.craftplugin | 1 - api/plugins/nextbuilds/.gitignore | 32 --- api/plugins/nextbuilds/CHANGELOG.md | 25 -- api/plugins/nextbuilds/LICENSE.md | 9 - api/plugins/nextbuilds/README.md | 43 ---- api/plugins/nextbuilds/composer.json | 44 ---- .../nextbuilds/resources/img/plugin-logo.png | Bin 3138 -> 0 bytes api/plugins/nextbuilds/src/NextBuilds.php | 219 ------------------ .../nextbuilds/NextBuildsAsset.php | 48 ---- .../nextbuilds/dist/css/NextBuilds.css | 11 - .../nextbuilds/dist/img/NextBuilds-icon.svg | 52 ----- .../nextbuilds/dist/js/NextBuilds.js | 11 - api/plugins/nextbuilds/src/config.php | 30 --- api/plugins/nextbuilds/src/icon-mask.svg | 52 ----- api/plugins/nextbuilds/src/icon.svg | 52 ----- .../nextbuilds/src/models/Settings.php | 54 ----- .../nextbuilds/src/services/Request.php | 83 ------- .../nextbuilds/src/templates/settings.twig | 54 ----- .../src/translations/en/next-builds.php | 18 -- 21 files changed, 65 insertions(+), 900 deletions(-) delete mode 100644 api/plugins/nextbuilds/.craftplugin delete mode 100755 api/plugins/nextbuilds/.gitignore delete mode 100755 api/plugins/nextbuilds/CHANGELOG.md delete mode 100755 api/plugins/nextbuilds/LICENSE.md delete mode 100755 api/plugins/nextbuilds/README.md delete mode 100755 api/plugins/nextbuilds/composer.json delete mode 100755 api/plugins/nextbuilds/resources/img/plugin-logo.png delete mode 100755 api/plugins/nextbuilds/src/NextBuilds.php delete mode 100755 api/plugins/nextbuilds/src/assetbundles/nextbuilds/NextBuildsAsset.php delete mode 100755 api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/css/NextBuilds.css delete mode 100755 api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/img/NextBuilds-icon.svg delete mode 100755 api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/js/NextBuilds.js delete mode 100755 api/plugins/nextbuilds/src/config.php delete mode 100755 api/plugins/nextbuilds/src/icon-mask.svg delete mode 100755 api/plugins/nextbuilds/src/icon.svg delete mode 100755 api/plugins/nextbuilds/src/models/Settings.php delete mode 100755 api/plugins/nextbuilds/src/services/Request.php delete mode 100755 api/plugins/nextbuilds/src/templates/settings.twig delete mode 100755 api/plugins/nextbuilds/src/translations/en/next-builds.php diff --git a/api/composer.json b/api/composer.json index 918a4425..f16e7ef0 100755 --- a/api/composer.json +++ b/api/composer.json @@ -1,7 +1,6 @@ { "require": { "carlcs/craft-assetmetadata": "^4.0", - "castiron/next-builds": "^1.1", "craftcms/cms": "4.10.2", "craftcms/contact-form": "3.1.0", "craftcms/contact-form-honeypot": "2.1.0", @@ -9,6 +8,7 @@ "craftcms/redactor": "3.0.4", "jamesedmonston/graphql-authentication": "2.5.0", "lsst-epo/canto-dam-assets": "^4.3", + "lsst-epo/craft-next-js-builds": "^1.2", "rynpsc/craft-phone-number": "2.2.0", "sebastianlenz/linkfield": "^2.1.4", "spicyweb/craft-neo": "4.0.7", @@ -18,17 +18,13 @@ "yiisoft/yii2-redis": "^2.0" }, "repositories": [ - { - "type": "vcs", - "url": "https://github.com/lsst-epo/craft-canto-dam-integrator.git" - }, { "type": "vcs", "url": "https://github.com/lsst-epo/canto-dam-assets.git" }, { - "type": "path", - "url": "plugins/nextbuilds" + "type": "vcs", + "url": "https://github.com/lsst-epo/craft-next-js-builds.git" }, { "type": "composer", diff --git a/api/composer.lock b/api/composer.lock index cb9e8bbf..19dc41fb 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "480e21d93f4546d015e84280b4271461", + "content-hash": "5439653d7ff349929deaba4be784f396", "packages": [ { "name": "abraham/twitteroauth", @@ -143,60 +143,6 @@ }, "time": "2022-04-14T14:56:01+00:00" }, - { - "name": "castiron/next-builds", - "version": "1.1.3", - "dist": { - "type": "path", - "url": "plugins/nextbuilds", - "reference": "f6661ef314b9a83b1bf384dcdf4b77b1dc19a019" - }, - "require": { - "craftcms/cms": "^4.0.0" - }, - "type": "craft-plugin", - "extra": { - "name": "Next Builds", - "handle": "next-builds", - "developer": "Cast Iron Coding", - "developerUrl": "https://castironcoding.com/", - "documentationUrl": "???", - "changelogUrl": "???", - "components": { - "request": "castiron\\nextbuilds\\services\\Request" - }, - "class": "castiron\\nextbuilds\\NextBuilds" - }, - "autoload": { - "psr-4": { - "castiron\\nextbuilds\\": "src/" - } - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Cast Iron Coding", - "homepage": "https://castironcoding.com/" - } - ], - "description": "Start Next.js page builds from Craft.", - "keywords": [ - "cms", - "craft", - "craft-plugin", - "craftcms", - "next builds" - ], - "support": { - "docs": "???", - "issues": "???" - }, - "transport-options": { - "relative": true - } - }, { "name": "cebe/markdown", "version": "1.2.1", @@ -2999,6 +2945,67 @@ }, "time": "2024-07-15T18:37:13+00:00" }, + { + "name": "lsst-epo/craft-next-js-builds", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/lsst-epo/craft-next-js-builds.git", + "reference": "cc18283f84d46d8068a6520a9b95c0b524f35167" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lsst-epo/craft-next-js-builds/zipball/cc18283f84d46d8068a6520a9b95c0b524f35167", + "reference": "cc18283f84d46d8068a6520a9b95c0b524f35167", + "shasum": "" + }, + "require": { + "craftcms/cms": "^4.0.0" + }, + "type": "craft-plugin", + "extra": { + "name": "Craft Next.js Builds", + "handle": "next-builds", + "documentationUrl": "???", + "changelogUrl": "???", + "components": { + "request": "lsst\\nextbuilds\\services\\Request" + }, + "class": "lsst\\nextbuilds\\NextBuilds" + }, + "autoload": { + "psr-4": { + "lsst\\nextbuilds\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "LSST EPO", + "homepage": "https://github.com/lsst-epo" + }, + { + "name": "Cast Iron Coding", + "homepage": "https://castironcoding.com/" + } + ], + "description": "Invoke Next.js page builds from Craft.", + "keywords": [ + "cms", + "craft", + "craft-plugin", + "craftcms", + "next builds" + ], + "support": { + "docs": "???", + "issues": "???", + "source": "https://github.com/lsst-epo/craft-next-js-builds/tree/1.2.0" + }, + "time": "2024-07-22T22:23:31+00:00" + }, { "name": "mikehaertl/php-shellcommand", "version": "1.7.0", diff --git a/api/plugins/nextbuilds/.craftplugin b/api/plugins/nextbuilds/.craftplugin deleted file mode 100644 index 4f2e6548..00000000 --- a/api/plugins/nextbuilds/.craftplugin +++ /dev/null @@ -1 +0,0 @@ -{"pluginName":"Next Builds","pluginDescription":"Start Next.js page builds from Craft.","pluginVersion":"1.0.0","pluginAuthorName":"Cast Iron Coding","pluginVendorName":"castiron","pluginAuthorUrl":"https://castironcoding.com/","pluginAuthorGithub":"","codeComments":"","pluginComponents":["services","settings"],"consolecommandName":"","controllerName":"","cpsectionName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"request","taskName":"","utilityName":"","widgetName":"","apiVersion":"api_version_3_0"} \ No newline at end of file diff --git a/api/plugins/nextbuilds/.gitignore b/api/plugins/nextbuilds/.gitignore deleted file mode 100755 index a17970cf..00000000 --- a/api/plugins/nextbuilds/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# CRAFT ENVIRONMENT -.env.php -.env.sh -.env - -# COMPOSER -/vendor - -# BUILD FILES -/bower_components/* -/node_modules/* -/build/* -/yarn-error.log - -# MISC FILES -.cache -.DS_Store -.idea -.project -.settings -*.esproj -*.sublime-workspace -*.sublime-project -*.tmproj -*.tmproject -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -config.codekit3 -prepros-6.config diff --git a/api/plugins/nextbuilds/CHANGELOG.md b/api/plugins/nextbuilds/CHANGELOG.md deleted file mode 100755 index cf6e3133..00000000 --- a/api/plugins/nextbuilds/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# Next Builds Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). - -## 1.1.3 - 2024-7-18 -### Fixed -- Deprecated class swap now works correctly by traversing the event target object with the underlying element and in the case of it being a NeoBlock, it's owner (parent) - -## 1.1.2 - 2024-6-28 -### Fixed -- When a page is updated (enabled, disabled, deleted) the appropriate query param is sent to revalidate the navigation menu in the client - -## 1.1.1 - 2024-6-27 -### Fixed -- Revalidate request is now firing after entry-save event trigger completes DB update - -## 1.1.0 - 2024-06-01 -### Removed -- Condition for only revalidated on save when the post is enabled - -## 1.0.0 - 2022-09-22 -### Added -- Initial release diff --git a/api/plugins/nextbuilds/LICENSE.md b/api/plugins/nextbuilds/LICENSE.md deleted file mode 100755 index 8479876c..00000000 --- a/api/plugins/nextbuilds/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2022 Cast Iron Coding - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/api/plugins/nextbuilds/README.md b/api/plugins/nextbuilds/README.md deleted file mode 100755 index 0dd67521..00000000 --- a/api/plugins/nextbuilds/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Next Builds plugin for Craft CMS 3.x - -Start Next.js page builds from Craft. - -![Screenshot](resources/img/plugin-logo.png) - -## Requirements - -This plugin requires Craft CMS 3.0.0-beta.23 or later. - -## Installation - -To install the plugin, follow these instructions. - -1. Open your terminal and go to your Craft project: - - cd /path/to/project - -2. Then tell Composer to load the plugin: - - composer require /next-builds - -3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Next Builds. - -## Next Builds Overview - --Insert text here- - -## Configuring Next Builds - --Insert text here- - -## Using Next Builds - --Insert text here- - -## Next Builds Roadmap - -Some things to do, and ideas for potential features: - -* Release it - -Brought to you by [Cast Iron Coding](https://castironcoding.com/) diff --git a/api/plugins/nextbuilds/composer.json b/api/plugins/nextbuilds/composer.json deleted file mode 100755 index 375d9255..00000000 --- a/api/plugins/nextbuilds/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "castiron/next-builds", - "description": "Start Next.js page builds from Craft.", - "type": "craft-plugin", - "version": "1.1.3", - "keywords": [ - "craft", - "cms", - "craftcms", - "craft-plugin", - "next builds" - ], - "support": { - "docs": "???", - "issues": "???" - }, - "license": "MIT", - "authors": [ - { - "name": "Cast Iron Coding", - "homepage": "https://castironcoding.com/" - } - ], - "require": { - "craftcms/cms": "^4.0.0" - }, - "autoload": { - "psr-4": { - "castiron\\nextbuilds\\": "src/" - } - }, - "extra": { - "name": "Next Builds", - "handle": "next-builds", - "developer": "Cast Iron Coding", - "developerUrl": "https://castironcoding.com/", - "documentationUrl": "???", - "changelogUrl": "???", - "components": { - "request": "castiron\\nextbuilds\\services\\Request" - }, - "class": "castiron\\nextbuilds\\NextBuilds" - } -} diff --git a/api/plugins/nextbuilds/resources/img/plugin-logo.png b/api/plugins/nextbuilds/resources/img/plugin-logo.png deleted file mode 100755 index 1b3542c0e39a982038983189e4174fff41fe92d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3138 zcmeH}`9IYA7sub9`HY#Nu`gjTGeX04HP$H0xX2bJRLauaP{@{SSC-G9;mR_V82cby zN*OKGEtxNUd7s#xi;SEA#5=kuLUO(t?~e*BS9+M!2pHe++iajO8Hg|1DXStktGhm*Ubou0RRPA zVLpA2AV7~BziL$|9D{oIbtf$!jk>nW@SjhGBNoMHhL(E*&G)vN@izeRw*{*=oAr*IGdt6# zN;fL(PJhdjcQf7zy_W=YpK){Q#VIDh%PL!{x`q=f(YuYTva5X?8HM=jL~$4G5be$K zRlA+(g3Bs5b4Sfv!eyMVI>kw==WFCo*3`-%OKGf2(NPMi{a`lD=9?IpO~3T+u?ci9 ze2h?&?;F7G(*SVv4|;@yz9zyieNu!m@CCJgTB_kkB}^sYdwQ=A=Cb=dz+phjVYVL- z9upVj9qd0L=G8(VX+U1T?;#n;>y@0}A&9PZ9FrtE_K}hd4HZ4AgPG``x@T&Xj(uzc zL21K@%r0%D!deEWLY`$1!0G|NDR`iGpurpDuVRNd@ zt5s!S0D2FTPva9;Z`-c-gUS^SrBw9FpPHJ7h&kD6#NFM3>T_J(+YLj?&C~da&0L*q?tD=Tntdyn&&)EURK}#?Rbe+c(`K*J? zu}m@KuLOHZ?iX+jr8_r0xZCP+=lv<<%-7Luj_~d^z?1%48MG)sOgc~(1Zr-R z)2cwcxS$`Imp=5;o;)4`(Q=&iQzP$_nxqjIr7VciB7r(VMCL!^ksv@)0Hu(RxIiB9 z4*@ItuACA<=%L~w$ne3kE~4rpi}>8dT{qQj2Jb{@ zdCd8MB{_`OYloy4;Xqsy(F>20QBtUaOgprY@WHTJNs9;qzp%3O&y3!Y7iwXnRPQlb#3rB>y_-r5IW^J)+;BCdh*Nl6Cvd9$qgMi|Q+)-6L3gSDA z@_JDWO%T)*1n?GN=v6%bjsBcmcnTg6AUXvh0Wu3i(?;3uy#5;&_`eAOt`W${Vf#|2AVN4Wd9-Fg%1LbAiUw=@PLy-L2V? zA6;>O?6{7aM$vTMQ*8d8Xh+dP*xz-5p(8hm$e1=pB&`|uioh|%a82ERrai80xdGK- zfTX#PcfO^ULtODAI}j8{6nVNQ3`h~6oBaFcJ&L#OnGIAFqxLH-_h@l4bM{k?mn`^V zz#Jho&J^Z`h=5V-+(BIB5VU@mDm)D7wWKgVzX?2pffyyAj}_|q5^Smq^Mk)A zGme7EFfilYdof}MI4)5IR<)42#E9vO{AA>3lHQGCh|@O82M;lGD5D7ojTlr3W#5bP zee2@_eHW!Z974r=!}L9|K{CK&uNWV>4id4$^FMBbN~_`#P^TR#0wOvVbpZAjip`Rb zfE`Zk&`0aijzRG<$_wV=?B(Mdt{`zJ7vcd?B-mFTITsTB5_DCJh&l8QExx`x z=2^+e`nObfx6*F7HXP=I;z1}>YAFXi&z3#KsfQAUSe`q81&%>hd^FVnO~c)R6#)}a z%bH$-EWeDi;v^m5#?Sgm#qx{Nw!qSA>|GAs9N7Z`Z{@sBhX%ZoD7yndtyI~yt)Q6xj8#mVn4noX#lnh%xMawgBA$me_#vVCZ+> zWLx;kksx~ggl@J|#fN{iv^Mt7%3sAHM`*k!2kJ!2*h+GGx@xiJ$+;qJ&sf!cpH^Gt zQ1PnuFWi)KDNB`?Ob2QTuY2qxz73lx1$=i;O*c(^ya;lOYz;k~b=iV}uEXYd2oDdtT0q$n7YU z`57Iwapz`V(f5OmMV|-+)56yHC#E(tq`*+ion2T8kzIZkjSLHwrT&=S{>UfBy>;b? zu%K-TUzWdOKIu?>>-M~fN`74FLV4Y4u-QDC(b+8^x`f86Tly$Sbb7b_h|FxY(k`ER zc(T1}|Jap>+caBDbs7|NqbB8=2o z-bw>Hl8s`j@Gqd4YW#^@o*|wOeBM6CffZncS8J-Sxz+RE57^Pp)%NCZjMV=C2g{Zf diff --git a/api/plugins/nextbuilds/src/NextBuilds.php b/api/plugins/nextbuilds/src/NextBuilds.php deleted file mode 100755 index 1195613d..00000000 --- a/api/plugins/nextbuilds/src/NextBuilds.php +++ /dev/null @@ -1,219 +0,0 @@ -plugin === $this) { - } - } - ); - - $this->setComponents([ - 'request' => NextRequestService::class - ]); - - Craft::info( - Craft::t( - 'next-builds', - '{name} plugin loaded', - ['name' => $this->name] - ), - __METHOD__ - ); - - // Event Listeners - Event::on( - Entry::class, - Entry::EVENT_AFTER_SAVE, - function (ModelEvent $event) { - $entry = $event->sender; - - if ( - $this->settings->activeSections[$entry->section->handle] && - !ElementHelper::isDraftOrRevision($entry) && - !($entry->duplicateOf && $entry->getIsCanonical() && !$entry->updatingFromDerivative) && - !ElementHelper::rootElement($entry)->isProvisionalDraft && - !$entry->resaving - ) { - $revalidateMenu = ($entry->type->handle == "pages"); - Craft::$app->onAfterRequest(function() use ($entry, $revalidateMenu) { - $this->request->buildPagesFromEntry($entry, $revalidateMenu); - }); - } - } - ); - - Event::on( - Entry::class, - Entry::EVENT_AFTER_DELETE, - function (Event $event) { - $entry = $event->sender; - if ( - $this->settings->activeSections[$entry->section->handle] && - !ElementHelper::isDraftOrRevision($entry) && - !($entry->duplicateOf && $entry->getIsCanonical() && !$entry->updatingFromDerivative) && - !ElementHelper::rootElement($entry)->isProvisionalDraft - ) { - $revalidateMenu = ($entry->type->handle == "pages"); - Craft::$app->onAfterRequest(function() use ($entry, $revalidateMenu) { - $this->request->buildPagesFromEntry($entry, $revalidateMenu); - }); - } - } - ); - - Event::on( - Structures::class, - Structures::EVENT_AFTER_INSERT_ELEMENT, - function (MoveElementEvent $event) { - $entry = $event->element; - $handle = null; - - if($entry instanceof Block) { - if (($owner = $entry->getOwner()) !== null) { - $handle = $owner->section->handle; - $entry = $entry->getOwner(); - } - } else if(property_exists($entry, "handle")) { - $handle = $entry->handle; - } - - if ( - $handle != null && - $this->settings->activeSections[$handle] && - !ElementHelper::isDraftOrRevision($entry) && - !($entry->duplicateOf && $entry->getIsCanonical() && !$entry->updatingFromDerivative) && - !ElementHelper::rootElement($entry)->isProvisionalDraft - ) { - $revalidateMenu = ($handle == "pages"); - Craft::$app->onAfterRequest(function() use ($entry, $revalidateMenu) { - $this->request->buildPagesFromEntry($entry, $revalidateMenu); - }); - } - } - ); - - Event::on( - Entry::class, - Entry::EVENT_AFTER_RESTORE, - function (Event $event) { - $entry = $event->sender; - if ( - $this->settings->activeSections[$entry->section->handle] && - !ElementHelper::isDraftOrRevision($entry) && - !($entry->duplicateOf && $entry->getIsCanonical() && !$entry->updatingFromDerivative) && - !ElementHelper::rootElement($entry)->isProvisionalDraft - ) { - $revalidateMenu = ($entry->type->handle == "pages"); - Craft::$app->onAfterRequest(function() use ($entry, $revalidateMenu) { - $this->request->buildPagesFromEntry($entry, $revalidateMenu); - }); - } - } - ); - } - - // Protected Methods - // ========================================================================= - - /** - * @inheritdoc - */ - protected function createSettingsModel(): ?\craft\base\Model - { - return new Settings(); - } - - /** - * @inheritdoc - */ - protected function settingsHtml(): string - { - return Craft::$app->view->renderTemplate( - 'next-builds/settings', - [ - 'settings' => $this->getSettings() - ] - ); - } -} diff --git a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/NextBuildsAsset.php b/api/plugins/nextbuilds/src/assetbundles/nextbuilds/NextBuildsAsset.php deleted file mode 100755 index e1308ba4..00000000 --- a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/NextBuildsAsset.php +++ /dev/null @@ -1,48 +0,0 @@ -sourcePath = "@castiron/nextbuilds/assetbundles/nextbuilds/dist"; - - $this->depends = [ - CpAsset::class, - ]; - - $this->js = [ - 'js/NextBuilds.js', - ]; - - $this->css = [ - 'css/NextBuilds.css', - ]; - - parent::init(); - } -} diff --git a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/css/NextBuilds.css b/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/css/NextBuilds.css deleted file mode 100755 index f7eb9b27..00000000 --- a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/css/NextBuilds.css +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Next Builds plugin for Craft CMS - * - * Next Builds CSS - * - * @author Cast Iron Coding - * @copyright Copyright (c) 2022 Cast Iron Coding - * @link https://castironcoding.com/ - * @package NextBuilds - * @since 1.0.0 - */ diff --git a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/img/NextBuilds-icon.svg b/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/img/NextBuilds-icon.svg deleted file mode 100755 index c8afbcdd..00000000 --- a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/img/NextBuilds-icon.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/js/NextBuilds.js b/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/js/NextBuilds.js deleted file mode 100755 index 8f204d4d..00000000 --- a/api/plugins/nextbuilds/src/assetbundles/nextbuilds/dist/js/NextBuilds.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Next Builds plugin for Craft CMS - * - * Next Builds JS - * - * @author Cast Iron Coding - * @copyright Copyright (c) 2022 Cast Iron Coding - * @link https://castironcoding.com/ - * @package NextBuilds - * @since 1.0.0 - */ diff --git a/api/plugins/nextbuilds/src/config.php b/api/plugins/nextbuilds/src/config.php deleted file mode 100755 index c2ceffd3..00000000 --- a/api/plugins/nextbuilds/src/config.php +++ /dev/null @@ -1,30 +0,0 @@ - true, - -]; diff --git a/api/plugins/nextbuilds/src/icon-mask.svg b/api/plugins/nextbuilds/src/icon-mask.svg deleted file mode 100755 index c8afbcdd..00000000 --- a/api/plugins/nextbuilds/src/icon-mask.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api/plugins/nextbuilds/src/icon.svg b/api/plugins/nextbuilds/src/icon.svg deleted file mode 100755 index c8afbcdd..00000000 --- a/api/plugins/nextbuilds/src/icon.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api/plugins/nextbuilds/src/models/Settings.php b/api/plugins/nextbuilds/src/models/Settings.php deleted file mode 100755 index 180c925b..00000000 --- a/api/plugins/nextbuilds/src/models/Settings.php +++ /dev/null @@ -1,54 +0,0 @@ -getSettings(); - $client = new Client(); - - $endpoint = $this->getSettingsData($settings->nextApiBaseUrl) . self::NEXT_ENDPOINT_REVALIDATE; - $params = [ - 'uri' => $entry->uri, - 'secret' => $this->getSettingsData($settings->nextSecretToken) - ]; - if ($revalidateMenu) { - $params["tags"] = ["navigation"]; - } - $requestUrl = $endpoint . '?' . http_build_query($params); - Craft::info("Request URL: " .$requestUrl, "REVALIDATE_STATUS"); - - try { - $client->request('GET', $requestUrl, []); - $isConsoleRequest = Craft::$app->getRequest()->getIsConsoleRequest(); - if (!$isConsoleRequest) { - Craft::$app->session->setNotice('Requesting revalidation: ' . $entry->uri); - } - } catch (\Exception $exception) { - Craft::error($exception->getMessage(), "REVALIDATE_STATUS"); - $isConsoleRequest = Craft::$app->getRequest()->getIsConsoleRequest(); - if (!$isConsoleRequest) { - Craft::$app->session->setError('Incremental rebuild failed. Frontend will update after next revalidation interval.'); - } - } - } - - // Protected Methods - // ========================================================================= - - /** - * @param string $setting - * @return string - */ - protected function getSettingsData(string $setting): string - { - if ($value = Craft::parseEnv($setting)) { - return $value; - } - - return $setting; - } -} diff --git a/api/plugins/nextbuilds/src/templates/settings.twig b/api/plugins/nextbuilds/src/templates/settings.twig deleted file mode 100755 index fe4f7e13..00000000 --- a/api/plugins/nextbuilds/src/templates/settings.twig +++ /dev/null @@ -1,54 +0,0 @@ -{# @var craft \craft\web\twig\variables\CraftVariable #} -{# -/** - * Next Builds plugin for Craft CMS 3.x - * - * Next Builds Settings.twig - * - * @author Cast Iron Coding - * @copyright Copyright (c) 2022 Cast Iron Coding - * @link https://castironcoding.com/ - * @package NextBuilds - * @since 1.0.0 - */ -#} - -{% import "_includes/forms" as forms %} - -{% do view.registerAssetBundle("castiron\\nextbuilds\\assetbundles\\nextbuilds\\NextBuildsAsset") %} - -{{ forms.autosuggestField({ - first: true, - label: "Next.js API Base URL", - name: 'nextApiBaseUrl', - value: settings.nextApiBaseUrl, - suggestEnvVars: true -}) }} - -{{ forms.autosuggestField({ - label: "Next.js API Secret Token", - name: 'nextSecretToken', - value: settings.nextSecretToken, - suggestEnvVars: true -}) }} - -
-
- - -
-

Choose which sections should have incremental page builds.

-
-
- {% for section in craft.app.sections.allSections %} -
- {{ forms.checkbox({ - label: section.name, - name: 'activeSections[' ~ section.handle ~ ']', - value: true, - checked: settings.activeSections[section.handle] ?? false, - }) }} -
- {% endfor %} -
- diff --git a/api/plugins/nextbuilds/src/translations/en/next-builds.php b/api/plugins/nextbuilds/src/translations/en/next-builds.php deleted file mode 100755 index be65ce82..00000000 --- a/api/plugins/nextbuilds/src/translations/en/next-builds.php +++ /dev/null @@ -1,18 +0,0 @@ - 'Next Builds plugin loaded', -];