Release of v3.2.1-alpha1

Add power path override option on component level. Fix the sql build feature. #1032.
This commit is contained in:
2024-04-06 19:48:58 +02:00
parent ddb07c79d9
commit 94bc92357e
754 changed files with 1520 additions and 1179 deletions

View File

@@ -0,0 +1,69 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Gitea\Miscellaneous;
use VDM\Joomla\Gitea\Abstraction\Api;
/**
* The Gitea Miscellaneous Activitypub
*
* @since 3.2.0
*/
class Activitypub extends Api
{
/**
* Returns the Person actor for a user.
*
* @param string $username The user's username.
*
* @return object|null
* @since 3.2.0
**/
public function get(string $username): ?object
{
// Build the request path.
$path = "/activitypub/user/{$username}";
// Send the GET request.
return $this->response->get(
$this->http->get(
$this->uri->get($path)
)
);
}
/**
* Send to the user's inbox.
*
* @param string $username The user's username.
* @param object $postData The post data.
*
* @return string
* @since 3.2.0
**/
public function send(string $username, object $postData): string
{
// Build the request path.
$path = "/activitypub/user/{$username}/inbox";
// Send the POST request.
return $this->response->get(
$this->http->post(
$this->uri->get($path), json_encode($postData)
), 204, 'success'
);
}
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Gitea\Miscellaneous;
use VDM\Joomla\Gitea\Abstraction\Api;
/**
* The Gitea Miscellaneous Gpg
*
* @since 3.2.0
*/
class Gpg extends Api
{
/**
* Get default signing-key.gpg.
*
* @return string|null
* @since 3.2.0
**/
public function get(): ?string
{
// Build the request path.
$path = "/signing-key.gpg";
// Send the get request.
return $this->response->get(
$this->http->get(
$this->uri->get($path)
)
);
}
}

View File

@@ -0,0 +1,87 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Gitea\Miscellaneous;
use VDM\Joomla\Gitea\Abstraction\Api;
/**
* The Gitea Miscellaneous Markdown
*
* @since 3.2.0
*/
class Markdown extends Api
{
/**
* Render a markdown document as HTML.
*
* @param string $markdownText The markdown text to render.
* @param bool $isWikiPage Is it a wiki page?
* @param string $context Context to render.
* @param string $mode Mode to render.
*
* @return string|null
* @since 3.2.0
**/
public function render(
string $markdownText,
bool $isWikiPage = false,
string $context = 'string',
string $mode = 'string'
): ?string
{
// Build the request path.
$path = "/markdown";
// Set the markdown data.
$data = new \stdClass();
$data->Text = $markdownText;
$data->Wiki = $isWikiPage;
$data->Context = $context;
$data->Mode = $mode;
// Send the post request.
return $this->response->get(
$this->http->post(
$this->uri->get($path),
json_encode($data),
['accept' => 'text/html']
)
);
}
/**
* Render raw markdown as HTML.
*
* @param string $rawMarkdown The raw markdown text to render.
*
* @return string|null
* @since 3.2.0
**/
public function raw(string $rawMarkdown): ?string
{
// Build the request path.
$path = "/markdown/raw";
// Send the post request.
return $this->response->get(
$this->http->post(
$this->uri->get($path),
$rawMarkdown,
['Content-Type' => 'text/plain', 'accept' => 'text/html']
)
);
}
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Gitea\Miscellaneous;
use VDM\Joomla\Gitea\Abstraction\Api;
/**
* The Gitea Miscellaneous NodeInfo
*
* @since 3.2.0
*/
class NodeInfo extends Api
{
/**
* Returns the nodeinfo of the Gitea application.
*
* @return object|null
* @since 3.2.0
**/
public function get(): ?object
{
// Build the request path.
$path = "/nodeinfo";
// Send the get request.
return $this->response->get(
$this->http->get(
$this->uri->get($path)
)
);
}
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Gitea\Miscellaneous;
use VDM\Joomla\Gitea\Abstraction\Api;
/**
* The Gitea Miscellaneous Version
*
* @since 3.2.0
*/
class Version extends Api
{
/**
* Returns the version of the Gitea application.
*
* @return object|null
* @since 3.2.0
**/
public function get(): ?object
{
// Build the request path.
$path = "/version";
// Send the get request.
return $this->response->get(
$this->http->get(
$this->uri->get($path)
)
);
}
}

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>