add deploy.yaml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marko 2022-07-19 15:39:38 +02:00
parent 5302e6ca99
commit b0f7f04ba6
6 changed files with 38 additions and 44 deletions

View File

@ -6,8 +6,20 @@ steps:
image: composer
commands:
- composer install
- name: cleanup
image: php:8.1
commands:
- apt-get update && apt-get install -y git zip
- curl -L https://phar.phpunit.de/phpunit.phar -o /usr/local/bin/phpunit
- curl -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar -o /usr/local/bin/phpcs
- curl -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar -o /usr/local/bin/phpcbf
- chmod +x /usr/local/bin/phpunit
- chmod +x /usr/local/bin/phpcs
- chmod +x /usr/local/bin/phpcbf
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- phpcs -n --standard=PSR2 .
- name: test
image: php:8.1
commands:
- vendor/bin/phpunit --configuration config.xml
- vendor/bin/phpunit

View File

@ -16,5 +16,5 @@ Installiere Abhängigkeiten
> make install
Starte MySQL-Server:
> docker compose up
> docker compose up

View File

@ -17,8 +17,7 @@ exports.FetchStream = FetchStream;
exports.CookieJar = CookieJar;
exports.fetchUrl = fetchUrl;
function FetchStream(url, options)
{
function FetchStream(url, options) {
Stream.call(this);
options = options || {};
@ -173,7 +172,7 @@ FetchStream.prototype.parseUrl = function (url) {
path: urlparts.pathname + (urlparts.search || '') || '/',
method: this.options.method,
rejectUnauthorized: this.options.rejectUnauthorized
};
};
switch (urlparts.protocol) {
case 'https:':
@ -186,17 +185,17 @@ FetchStream.prototype.parseUrl = function (url) {
}
if (transport === https) {
if ('agentHttps' in this.options) {
if('agentHttps' in this.options){
urloptions.agent = this.options.agentHttps;
}
if ('agent' in this.options) {
if('agent' in this.options){
urloptions.agent = this.options.agent;
}
} else {
if ('agentHttp' in this.options) {
if('agentHttp' in this.options){
urloptions.agent = this.options.agentHttp;
}
if ('agent' in this.options) {
if('agent' in this.options){
urloptions.agent = this.options.agent;
}
}
@ -383,8 +382,7 @@ FetchStream.prototype._runStream = function (url_data, url) {
}
};
function fetchUrl(url, options, callback)
{
function fetchUrl(url, options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = undefined;
@ -455,8 +453,7 @@ function fetchUrl(url, options, callback)
});
}
function _parseContentType(str)
{
function _parseContentType(str) {
if (!str) {
return {};
}
@ -479,8 +476,7 @@ function _parseContentType(str)
};
}
function _findHTMLCharset(htmlbuffer)
{
function _findHTMLCharset(htmlbuffer) {
var body = htmlbuffer.toString('ascii'),
input, meta, charset;

View File

@ -1,26 +1,22 @@
var initParameters = {};
var entrypoint = null;
function onEditQuery(newQuery)
{
function onEditQuery(newQuery) {
initParameters.query = newQuery;
updateURL();
}
function onEditVariables(newVariables)
{
function onEditVariables(newVariables) {
initParameters.variables = newVariables;
updateURL();
}
function onEditOperationName(newOperationName)
{
function onEditOperationName(newOperationName) {
initParameters.operationName = newOperationName;
updateURL();
}
function updateURL()
{
function updateURL() {
var newSearch = '?' + Object.keys(initParameters).filter(function (key) {
return Boolean(initParameters[key]);
}).map(function (key) {
@ -29,8 +25,7 @@ function updateURL()
history.replaceState(null, null, newSearch);
}
function graphQLFetcher(graphQLParams)
{
function graphQLFetcher(graphQLParams) {
return fetch(entrypoint, {
method: 'post',
headers: {
@ -50,7 +45,7 @@ function graphQLFetcher(graphQLParams)
});
}
window.onload = function () {
window.onload = function() {
var data = JSON.parse(document.getElementById('graphiql-data').innerText);
entrypoint = data.entrypoint;

View File

@ -1,4 +1,4 @@
window.addEventListener('load', function (event) {
window.addEventListener('load', function(event) {
var loadingWrapper = document.getElementById('loading-wrapper');
loadingWrapper.classList.add('fadeOut');

View File

@ -1,22 +1,18 @@
'use strict';
window.onload = function () {
window.onload = function() {
manageWebbyDisplay();
new MutationObserver(function (mutations, self) {
const op = document.getElementById(`operations-${data.shortName}-${data.operationId}`);
if (!op) {
return;
}
if (!op) return;
self.disconnect();
op.querySelector('.opblock-summary').click();
const tryOutObserver = new MutationObserver(function (mutations, self) {
const tryOut = op.querySelector('.try-out__btn');
if (!tryOut) {
return;
}
if (!tryOut) return;
self.disconnect();
@ -35,7 +31,7 @@ window.onload = function () {
}
// Wait input values to be populated before executing the query
setTimeout(function () {
setTimeout(function(){
op.querySelector('.execute').click();
op.scrollIntoView();
}, 500);
@ -75,12 +71,10 @@ window.onload = function () {
// Adapted from https://github.com/vitalyq/react-trigger-change/blob/master/lib/change.js
// Copyright (c) 2017 Vitaly Kuznetsov
// MIT License
function reactTriggerChange(node)
{
function reactTriggerChange(node) {
// Do not try to delete non-configurable properties.
// Value and checked properties on DOM elements are non-configurable in PhantomJS.
function deletePropertySafe(elem, prop)
{
function deletePropertySafe(elem, prop) {
const desc = Object.getOwnPropertyDescriptor(elem, prop);
if (desc && desc.configurable) {
delete elem[prop];
@ -135,12 +129,9 @@ window.onload = function () {
}
}
function manageWebbyDisplay()
{
function manageWebbyDisplay() {
const webby = document.getElementsByClassName('webby')[0];
if (!webby) {
return;
}
if (!webby) return;
const web = document.getElementsByClassName('web')[0];
webby.classList.add('calm');