This commit is contained in:
hashbro
2026-08-24 06:23:07 +08:00
parent c00396dc1f
commit db574cc629
114 changed files with 108297 additions and 266 deletions
+32 -2
View File
@@ -1,5 +1,6 @@
<?php
use App\Services\ChannelProjectService;
use App\Services\Tokenview\TokenviewClient;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
@@ -70,11 +71,11 @@ Artisan::command('xxbb:build {--channel-c=} {--random-c}', function () {
$channelC = trim((string) $this->option('channel-c'));
$random = (bool) $this->option('random-c');
try {
$result = app(\App\Services\ChannelProjectService::class)->buildSharedArtifacts(
$result = app(ChannelProjectService::class)->buildSharedArtifacts(
$channelC !== '' ? $channelC : null,
$random,
);
} catch (\Throwable $e) {
} catch (Throwable $e) {
$this->error($e->getMessage());
return 1;
@@ -103,6 +104,35 @@ Artisan::command('xxbb:build {--channel-c=} {--random-c}', function () {
return 0;
})->purpose('Build shared xxbb /details and staged weifile from channel c');
Artisan::command('ds:build {--host=} {--port=} {--origin=}', function () {
$script = base_path('channel-builder-ds/tools/build.py');
if (! is_file($script)) {
$this->error('missing '.$script);
return 1;
}
$args = ['python3', $script];
$host = trim((string) $this->option('host'));
$port = trim((string) $this->option('port'));
$origin = trim((string) $this->option('origin'));
if ($origin !== '') {
$args[] = '--origin';
$args[] = $origin;
}
if ($host !== '') {
$args[] = '--host';
$args[] = $host;
}
if ($port !== '') {
$args[] = '--port';
$args[] = $port;
}
$this->info(implode(' ', $args));
passthru(implode(' ', array_map('escapeshellarg', $args)), $code);
return $code;
})->purpose('Rewrite DarkSword source and publish public/next-chain');
Artisan::command('coruna:channel-domains {--json}', function () {
$domains = array_values(array_filter(config('coruna.channel_domains', [])));
if ($this->option('json')) {