Skip to content

Commit

Permalink
Merge branch 'master' of github.com:beyondcode/expose
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed Apr 9, 2024
2 parents b214aeb + f82dd88 commit d13fc7a
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 15 deletions.
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: []
body:
- type: markdown
attributes:
value: |
Before opening a bug report, please search for the behaviour in the existing issues.
---
Thank you for taking the time to file a bug report. To address this bug as fast as possible, we need some information.
- type: dropdown
id: arch
attributes:
label: System architecture
description: "Which operating system architecture are you using?"
options:
- Mac, Intel (x86)
- Mac, ARM64 (M1, M2, etc)
- Windows
- Linux
validations:
required: true
- type: input
id: php
attributes:
label: PHP Version
description: "If your problem only occurs with a certain PHP version, please provide it in the field below."
placeholder: "PHP 8.2.8 (cli) (built: Jul 7 2023 00:11:29) (NTS)"
validations:
required: false
- type: textarea
id: bug-description
attributes:
label: Bug description
description: What happened and what did you expect to happen?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Which steps do we need to take to reproduce this error?

- type: textarea
id: logs
attributes:
label: Relevant log output
description: If applicable, provide relevant log output. No need for backticks here.
render: shell
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Check the docs
url: https://expose.dev/docs/introduction
about: "This repository contains the open source version of Expose. Please contact our email support if you have issues with our network or Expose Pro!"
- name: Security vulnerabilities
url: https://@beyondco.de
about: If you want to report a security issue, please contact our support.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Feature Request
description: Propose a new feature for the open source version of Expose
title: "[Feature Request]: "
labels: [feature request]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting a feature for the Expose open source version!
- type: textarea
id: feature-description
attributes:
label: Feature Description
description: How should this feature look like?
validations:
required: true
- type: textarea
id: valuable
attributes:
label: Is this feature valuable for other users as well and why?
description: We want to build software that provides a great experience for all of us.
3 changes: 2 additions & 1 deletion app/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
use App\Logger\CliRequestLogger;
use Carbon\Carbon;
use Illuminate\Support\Arr;
use function Ratchet\Client\connect;
use Ratchet\Client\WebSocket;
use React\EventLoop\LoopInterface;
use React\Promise\Deferred;
use React\Promise\PromiseInterface;

use function Ratchet\Client\connect;

class Client
{
protected const MAX_CONNECTION_RETRIES = 3;
Expand Down
3 changes: 2 additions & 1 deletion app/Client/Http/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use App\Client\Http\Modifiers\CheckBasicAuthentication;
use App\Logger\RequestLogger;
use GuzzleHttp\Psr7\Message;
use function GuzzleHttp\Psr7\parse_request;
use Laminas\Http\Request;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -16,6 +15,8 @@
use React\Http\Browser;
use React\Socket\Connector;

use function GuzzleHttp\Psr7\parse_request;

class HttpClient
{
/** @var LoopInterface */
Expand Down
3 changes: 2 additions & 1 deletion app/Client/ProxyManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
namespace App\Client;

use App\Client\Http\HttpClient;
use function Ratchet\Client\connect;
use Ratchet\Client\WebSocket;
use Ratchet\RFC6455\Messaging\Frame;
use React\EventLoop\LoopInterface;
use React\Socket\Connector;

use function Ratchet\Client\connect;

class ProxyManager
{
/** @var Configuration */
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Concerns/LoadsViews.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

namespace App\Http\Controllers\Concerns;

use function GuzzleHttp\Psr7\stream_for;
use Ratchet\ConnectionInterface;
use Twig\Environment;
use Twig\Loader\ArrayLoader;

use function GuzzleHttp\Psr7\stream_for;

trait LoadsViews
{
protected function getView(?ConnectionInterface $connection, string $view, array $data = [])
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

use App\Http\Controllers\Concerns\LoadsViews;
use App\Http\Controllers\Concerns\ParsesIncomingRequest;
use function GuzzleHttp\Psr7\parse_request;
use Illuminate\Http\Request;
use Psr\Http\Message\RequestInterface;
use Ratchet\ConnectionInterface;
use Ratchet\Http\HttpServerInterface;

use function GuzzleHttp\Psr7\parse_request;

abstract class Controller implements HttpServerInterface
{
use LoadsViews;
Expand Down
3 changes: 2 additions & 1 deletion app/Logger/LoggedRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Carbon\Carbon;
use GuzzleHttp\Psr7\Message;
use function GuzzleHttp\Psr7\parse_request;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Laminas\Http\Header\GenericHeader;
Expand All @@ -13,6 +12,8 @@
use Namshi\Cuzzle\Formatter\CurlFormatter;
use Riverline\MultiPartParser\StreamedPart;

use function GuzzleHttp\Psr7\parse_request;

class LoggedRequest implements \JsonSerializable
{
/** @var string */
Expand Down
3 changes: 2 additions & 1 deletion app/Server/Http/Controllers/ControlMessageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
use Ratchet\WebSocket\MessageComponentInterface;
use React\Promise\Deferred;
use React\Promise\PromiseInterface;
use function React\Promise\reject;
use stdClass;

use function React\Promise\reject;

class ControlMessageController implements MessageComponentInterface
{
/** @var ConnectionManager */
Expand Down
3 changes: 2 additions & 1 deletion app/Server/Http/Controllers/TunnelMessageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
use App\Server\Configuration;
use App\Server\Connections\ControlConnection;
use App\Server\Connections\HttpConnection;
use function GuzzleHttp\Psr7\str;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Nyholm\Psr7\Factory\Psr17Factory;
use Ratchet\ConnectionInterface;
use Ratchet\RFC6455\Messaging\Frame;
use Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory;

use function GuzzleHttp\Psr7\str;

class TunnelMessageController extends Controller
{
/** @var ConnectionManager */
Expand Down
7 changes: 4 additions & 3 deletions app/Server/Http/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace App\Server\Http;

use App\Http\QueryParameters;
use function GuzzleHttp\Psr7\build_query;
use function GuzzleHttp\Psr7\parse_query;
use GuzzleHttp\Psr7\ServerRequest;
use Psr\Http\Message\RequestInterface;
use Ratchet\ConnectionInterface;
Expand All @@ -16,6 +14,9 @@
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Matcher\UrlMatcher;

use function GuzzleHttp\Psr7\build_query;
use function GuzzleHttp\Psr7\parse_query;

class Router implements HttpServerInterface
{
use CloseResponseTrait;
Expand Down Expand Up @@ -72,7 +73,7 @@ public function onOpen(ConnectionInterface $conn, RequestInterface $request = nu

$parameters = [];
foreach ($route as $key => $value) {
if ((is_string($key)) && ('_' !== substr($key, 0, 1))) {
if (is_string($key) && ('_' !== substr($key, 0, 1))) {
$parameters[$key] = $value;
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Feature/Client/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use App\Logger\RequestLogger;
use GuzzleHttp\Psr7\Message;
use GuzzleHttp\Psr7\Request;
use function GuzzleHttp\Psr7\str;
use Illuminate\Support\Arr;
use Mockery as m;
use Psr\Http\Message\RequestInterface;
Expand All @@ -18,6 +17,8 @@
use React\Http\Message\ResponseException;
use Tests\Feature\TestCase;

use function GuzzleHttp\Psr7\str;

class DashboardTest extends TestCase
{
/** @var Browser */
Expand Down
3 changes: 2 additions & 1 deletion tests/Feature/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace Tests\Feature;

use function Clue\React\Block\await;
use Clue\React\SQLite\DatabaseInterface;
use React\EventLoop\LoopInterface;
use React\Promise\PromiseInterface;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\ConsoleOutputInterface;

use function Clue\React\Block\await;

abstract class TestCase extends \Tests\TestCase
{
const AWAIT_TIMEOUT = 5.0;
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/LoggedRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

use App\Logger\LoggedRequest;
use GuzzleHttp\Psr7\Request;
use function GuzzleHttp\Psr7\str;
use Laminas\Http\Request as LaminasRequest;
use Tests\TestCase;

use function GuzzleHttp\Psr7\str;

class LoggedRequestTest extends TestCase
{
/** @test */
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/RequestLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
use App\Logger\RequestLogger;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use function GuzzleHttp\Psr7\str;
use Laminas\Http\Request as LaminasRequest;
use Mockery as m;
use React\Http\Browser;
use Tests\TestCase;

use function GuzzleHttp\Psr7\str;

class RequestLoggerTest extends TestCase
{
/** @test */
Expand Down

0 comments on commit d13fc7a

Please sign in to comment.