Skip to content

Commit b97f037

Browse files
committed
First commit
0 parents  commit b97f037

20 files changed

Lines changed: 7735 additions & 0 deletions

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.yml]
15+
indent_style = space
16+
indent_size = 2

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text=auto eol=lf
2+
/.github export-ignore
3+
.scrutinizer.yml export-ignore
4+
BACKERS.md export-ignore
5+
CONTRIBUTING.md export-ignore
6+
CHANGELOG.md export-ignore

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/vendor
2+
/.idea
3+
/.vscode
4+
/.vagrant
5+
.phpunit.result.cache

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# hypernode-api-cli
2+
3+
Standalone PHAR implementation of the Hypernode API PHP client library.

app/Commands/.gitkeep

Whitespace-only changes.

app/Commands/ListBrancherNodes.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace App\Commands;
4+
5+
use Illuminate\Console\Scheduling\Schedule;
6+
use LaravelZero\Framework\Commands\Command;
7+
8+
class ListBrancherNodes extends Command
9+
{
10+
/**
11+
* The signature of the command.
12+
*
13+
* @var string
14+
*/
15+
protected $signature = 'brancher:list';
16+
17+
/**
18+
* The description of the command.
19+
*
20+
* @var string
21+
*/
22+
protected $description = 'List all Brancher nodes for a given Hypernode';
23+
24+
/**
25+
* Execute the console command.
26+
*
27+
* @return mixed
28+
*/
29+
public function handle()
30+
{
31+
//
32+
}
33+
34+
/**
35+
* Define the command's schedule.
36+
*
37+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
38+
* @return void
39+
*/
40+
public function schedule(Schedule $schedule): void
41+
{
42+
// $schedule->command(static::class)->everyMinute();
43+
}
44+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Providers;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class AppServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Bootstrap any application services.
11+
*/
12+
public function boot(): void
13+
{
14+
//
15+
}
16+
17+
/**
18+
* Register any application services.
19+
*/
20+
public function register(): void
21+
{
22+
//
23+
}
24+
}

bootstrap/app.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| Create The Application
6+
|--------------------------------------------------------------------------
7+
|
8+
| The first thing we will do is create a new Laravel application instance
9+
| which serves as the "glue" for all the components of Laravel, and is
10+
| the IoC container for the system binding all of the various parts.
11+
|
12+
*/
13+
14+
$app = new LaravelZero\Framework\Application(
15+
dirname(__DIR__)
16+
);
17+
18+
/*
19+
|--------------------------------------------------------------------------
20+
| Bind Important Interfaces
21+
|--------------------------------------------------------------------------
22+
|
23+
| Next, we need to bind some important interfaces into the container so
24+
| we will be able to resolve them when needed. The kernels serve the
25+
| incoming requests to this application from both the web and CLI.
26+
|
27+
*/
28+
29+
$app->singleton(
30+
Illuminate\Contracts\Console\Kernel::class,
31+
LaravelZero\Framework\Kernel::class
32+
);
33+
34+
$app->singleton(
35+
Illuminate\Contracts\Debug\ExceptionHandler::class,
36+
Illuminate\Foundation\Exceptions\Handler::class
37+
);
38+
39+
/*
40+
|--------------------------------------------------------------------------
41+
| Return The Application
42+
|--------------------------------------------------------------------------
43+
|
44+
| This script returns the application instance. The instance is given to
45+
| the calling script so we can separate the building of the instances
46+
| from the actual running of the application and sending responses.
47+
|
48+
*/
49+
50+
return $app;

box.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"chmod": "0755",
3+
"directories": [
4+
"app",
5+
"bootstrap",
6+
"config",
7+
"vendor"
8+
],
9+
"files": [
10+
"composer.json"
11+
],
12+
"exclude-composer-files": false,
13+
"compression": "GZ",
14+
"compactors": [
15+
"KevinGH\\Box\\Compactor\\Php",
16+
"KevinGH\\Box\\Compactor\\Json"
17+
]
18+
}

composer.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "elgentos/hypernode-api-cli",
3+
"description": "Hypernode API CLI in PHP",
4+
"type": "project",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Peter Jaap Blaakmeer",
9+
"email": "peterjaap@elgnetos.nl"
10+
}
11+
],
12+
"require": {
13+
"php": "^8.1",
14+
"hypernode/api-client": "^0.2.1",
15+
"laravel-zero/framework": "^10.0",
16+
"nunomaduro/termwind": "^1.15",
17+
"nyholm/psr7": "^1.5",
18+
"symfony/http-client": "^6.2"
19+
},
20+
"require-dev": {
21+
"laravel/pint": "^1.5",
22+
"mockery/mockery": "^1.5.1",
23+
"pestphp/pest": "^1.22.3"
24+
},
25+
"autoload": {
26+
"psr-4": {
27+
"App\\": "app/",
28+
"Database\\Factories\\": "database/factories/",
29+
"Database\\Seeders\\": "database/seeders/"
30+
}
31+
},
32+
"autoload-dev": {
33+
"psr-4": {
34+
"Tests\\": "tests/"
35+
}
36+
},
37+
"config": {
38+
"preferred-install": "dist",
39+
"sort-packages": true,
40+
"optimize-autoloader": true,
41+
"allow-plugins": {
42+
"pestphp/pest-plugin": true,
43+
"php-http/discovery": true
44+
}
45+
},
46+
"scripts": {
47+
"post-install-cmd": [
48+
"wget https://raw.githubusercontent.com/ByteInternet/hypernode-api-php/8776b586c600dfe77d7dcec9023c944ed7705c2b/src/Service/BrancherApp.php -O vendor/hypernode/api-client/src/Service/BrancherApp.php"
49+
]
50+
},
51+
"minimum-stability": "stable",
52+
"prefer-stable": true,
53+
"bin": ["hypernode-api-cli"]
54+
}

0 commit comments

Comments
 (0)