diff --git a/bin/fix-cs.sh b/bin/fix-cs.sh old mode 100755 new mode 100644 diff --git a/bin/static-analyze.sh b/bin/static-analyze.sh old mode 100755 new mode 100644 diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..c827261 --- /dev/null +++ b/composer.lock @@ -0,0 +1,71 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e66ed53b19dbc21c2c07f584040134f2", + "packages": [ + { + "name": "tinect/flysystem-bunnycdn", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/tinect/flysystem-bunnycdn.git", + "reference": "6209a46188a9f42b34207bba626380e8b7e49b9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tinect/flysystem-bunnycdn/zipball/6209a46188a9f42b34207bba626380e8b7e49b9f", + "reference": "6209a46188a9f42b34207bba626380e8b7e49b9f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/guzzle": "^7.2", + "league/flysystem": "^1.0" + }, + "require-dev": { + "fzaninotto/faker": "^1.5", + "league/flysystem-memory": "^1.0", + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^8.5.23 | ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "PlatformCommunity\\Flysystem\\BunnyCDN\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Sinnott", + "email": "alex@platformapp.io" + } + ], + "description": "Flysystem adapter for BunnyCDN. This is a temporarily productive fork of platformcommunity/flysystem-bunnycdn", + "support": { + "source": "https://github.com/tinect/flysystem-bunnycdn/tree/1.0.1" + }, + "time": "2022-09-04T22:07:49+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/src/Resources/config/plugin.png b/src/Resources/config/plugin.png old mode 100755 new mode 100644 diff --git a/src/Resources/public/administration/js/frosh-platform-bunnycdn-media-storage.js b/src/Resources/public/administration/js/frosh-platform-bunnycdn-media-storage.js new file mode 100644 index 0000000..02b166b --- /dev/null +++ b/src/Resources/public/administration/js/frosh-platform-bunnycdn-media-storage.js @@ -0,0 +1 @@ +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/bundles/froshplatformbunnycdnmediastorage/",n(n.s="v9fe")}({"+Mse":function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"bunnycdn-api-test";return r(this,f),a.call(this,t,e,n)}return e=f,(n=[{key:"check",value:function(t){var e=this.getBasicHeaders({});return this.httpClient.post("_action/".concat(this.getApiBasePath(),"/check"),t,{headers:e}).then((function(t){return s.handleResponse(t)}))}}])&&o(e.prototype,n),u&&o(e,u),Object.defineProperty(e,"prototype",{writable:!1}),f}(s);f.addServiceProvider("bunnycdnApiTest",(function(t){var e=f.getContainer("init");return new l(e.httpClient,t.loginService)}))},JI9F:function(t){t.exports=JSON.parse('{"bunnycdn-api-test-button":{"title":"API Test","success":"Connection was successfully tested","error":"Connection could not be established. Please check the config."}}')},QqhQ:function(t,e){var n=Shopware,r=n.Component;n.Mixin;r.register("bunnycdn-config-restriction",{template:" ",created:function(){this.checkAndHideSetting()},updated:function(){this.checkAndHideSetting()},methods:{checkAndHideSetting:function(){var t=document.querySelectorAll('input[name^="FroshPlatformBunnycdnMediaStorage.config"],.sw-plugin-config__save-action');this.pluginConfigData().currentSalesChannelId?t.forEach((function(t){t.setAttribute("disabled","disabled")})):t.forEach((function(t){t.removeAttribute("disabled")}))},pluginConfigData:function(){for(var t=this.$parent,e=0;e<20;e++){if(t.actualConfigData)return t;t=t.$parent}throw"Can not get pluginConfigData"}}})},eatg:function(t){t.exports=JSON.parse('{"bunnycdn-api-test-button":{"title":"API Test","success":"Verbindung wurde erfolgreich getestet","error":"Verbindung konnte nicht hergestellt werden. Bitte prüfe die Konfiguration."}}')},v9fe:function(t,e,n){"use strict";n.r(e);n("+Mse");var r=Shopware,o=r.Component,i=r.Mixin;o.register("bunnycdn-api-test-button",{template:'
\n {{ btnLabel }}\n
\n',props:["btnLabel"],inject:["bunnycdnApiTest"],mixins:[i.getByName("notification")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},computed:{pluginConfigData:function(){for(var t=this.$parent,e=0;e<20;e++){if(t.actualConfigData)return t.actualConfigData.null;t=t.$parent}throw"Can not get pluginConfigData"}},methods:{saveFinish:function(){this.isSaveSuccessful=!1},check:function(){var t=this;this.isLoading=!0,this.bunnycdnApiTest.check(this.pluginConfigData).then((function(e){e.success?(t.isSaveSuccessful=!0,t.createNotificationSuccess({title:t.$tc("bunnycdn-api-test-button.title"),message:t.$tc("bunnycdn-api-test-button.success")})):t.createNotificationError({title:t.$tc("bunnycdn-api-test-button.title"),message:t.$tc("bunnycdn-api-test-button.error")}),setTimeout((function(){t.isLoading=!1}),2500)}))}}});n("QqhQ");var c=n("eatg"),u=n("JI9F");Shopware.Locale.extend("de-DE",c),Shopware.Locale.extend("en-GB",u)}}); \ No newline at end of file diff --git a/src/Resources/store/de.md b/src/Resources/store/de.md deleted file mode 100644 index fbfe0a7..0000000 --- a/src/Resources/store/de.md +++ /dev/null @@ -1,10 +0,0 @@ -Mit diesem Plugin haben Sie eine direkte Verbindung zu Ihrem Storage auf BunnyCDN. -Transferieren Sie Ihre Elemente, wie Bilder, aus dem Medien-Manager nach BunnyCDN Storage. - -Bitte beachten Sie, dass Sie ein Konto bei BunnyCDN benötigen. - -Dieses Plugin wird von [@FriendsOfShopware](https://store.shopware.com/friends-of-shopware.html) -entwickelt. -Maintainer dieses Plugins ist: [Sebastian König (tinect)](https://github.com/tinect) - -Bei Fragen / Fehlern bitte ein [Github Issue](https://github.com/FriendsOfShopware/FroshPlatformBunnycdnMediaStorage/issues/new) erstellen diff --git a/src/Resources/store/de_features.txt b/src/Resources/store/de_features.txt deleted file mode 100644 index 39e7e71..0000000 --- a/src/Resources/store/de_features.txt +++ /dev/null @@ -1,3 +0,0 @@ -Keine Auslastung Ihres Servers durch Zugriffe auf die Medien -Geringere Ladezeiten für Besucher weltweit -Ihre Backups sind erheblich kleiner und schneller, da die Medien nicht im Shop-Verzeichnis liegen diff --git a/src/Resources/store/de_manual.md b/src/Resources/store/de_manual.md deleted file mode 100644 index 528b0dc..0000000 --- a/src/Resources/store/de_manual.md +++ /dev/null @@ -1 +0,0 @@ -## Sie finden die Anleitung [hier](https://github.com/FriendsOfShopware/FroshPlatformBunnycdnMediaStorage#usage-since-plugin-version-200) diff --git a/src/Resources/store/en.md b/src/Resources/store/en.md deleted file mode 100644 index 815e853..0000000 --- a/src/Resources/store/en.md +++ /dev/null @@ -1,9 +0,0 @@ -With this plugin you have a direct connection to your storage on BunnyCDN. -Transfer your files from the media manager to BunnyCDN Storage. - -Please note that you need an account at [BunnyCDN](https://bunnycdn.com/solutions/cdn-cloud-storage). - -This plugin is part of [@FriendsOfShopware](https://store.shopware.com/en/friends-of-shopware.html). -Maintainer from the plugin is: [Sebastian König (tinect)](https://github.com/tinect) - -For questions or bugs please create a [Github Issue](https://github.com/FriendsOfShopware/FroshPlatformBunnycdnMediaStorage/issues/new) diff --git a/src/Resources/store/en_features.txt b/src/Resources/store/en_features.txt deleted file mode 100644 index 39a1922..0000000 --- a/src/Resources/store/en_features.txt +++ /dev/null @@ -1,3 +0,0 @@ -No utilization of your server due to access to the media. -Lower load times for visitors worldwide -Your backups are considerably smaller and faster because the media is not in the shop directory diff --git a/src/Resources/store/en_manual.md b/src/Resources/store/en_manual.md deleted file mode 100644 index 6d49b3f..0000000 --- a/src/Resources/store/en_manual.md +++ /dev/null @@ -1 +0,0 @@ -## You'll find the manual [here](https://github.com/FriendsOfShopware/FroshPlatformBunnycdnMediaStorage#usage-since-plugin-version-200) diff --git a/src/Resources/store/icon.png b/src/Resources/store/icon.png deleted file mode 100755 index b7b6d7b..0000000 Binary files a/src/Resources/store/icon.png and /dev/null differ diff --git a/src/Resources/store/images/0.png b/src/Resources/store/images/0.png deleted file mode 100644 index ad3e972..0000000 Binary files a/src/Resources/store/images/0.png and /dev/null differ diff --git a/src/Resources/store/images/1.png b/src/Resources/store/images/1.png deleted file mode 100644 index d5decdc..0000000 Binary files a/src/Resources/store/images/1.png and /dev/null differ diff --git a/src/Resources/store/images/2.jpg b/src/Resources/store/images/2.jpg deleted file mode 100755 index 3938839..0000000 Binary files a/src/Resources/store/images/2.jpg and /dev/null differ diff --git a/src/Resources/store/images/3.jpg b/src/Resources/store/images/3.jpg deleted file mode 100755 index 06ec253..0000000 Binary files a/src/Resources/store/images/3.jpg and /dev/null differ diff --git a/src/Resources/store/store.json b/src/Resources/store/store.json deleted file mode 100644 index ef83ad6..0000000 --- a/src/Resources/store/store.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "storeAvailabilities": [ - "International", - "German" - ], - "standardLocale": "en_GB", - "localizations": [ - "en_GB", - "de_DE" - ], - "categories": [ - "System", - "ConversionOptimierung" - ], - "productType": "extension", - "responsive": true, - "tags": { - "en": [ - "bunnycdn", - "performance", - "space" - ], - "de": [ - "bunnycdn", - "performance", - "space" - ] - } -}