From 3b9ac1b4cd045d6096e4fb920555ea91a130f519 Mon Sep 17 00:00:00 2001 From: Nolan Ehrstrom Date: Wed, 8 Oct 2025 13:48:05 -0700 Subject: [PATCH 1/2] Add json output --- ProcessMaker/Console/Commands/TenantsList.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ProcessMaker/Console/Commands/TenantsList.php b/ProcessMaker/Console/Commands/TenantsList.php index 72b24b599d..0971536155 100644 --- a/ProcessMaker/Console/Commands/TenantsList.php +++ b/ProcessMaker/Console/Commands/TenantsList.php @@ -15,7 +15,7 @@ class TenantsList extends Command * * @var string */ - protected $signature = 'tenants:list {--ids : Only output the ids}'; + protected $signature = 'tenants:list {--ids : Only output the ids} {--json : Output the tenants as JSON}'; /** * The console command description. @@ -40,6 +40,12 @@ public function handle() return; } + if ($this->option('json')) { + $this->line(json_encode($tenants->toArray(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); + + return; + } + $formattedTenants = $tenants->map(function ($tenant) { $config = $tenant->config; From a3bc22d4889bdaa03396f07c3d9eba33ec2f032f Mon Sep 17 00:00:00 2001 From: Nolan Ehrstrom Date: Wed, 8 Oct 2025 13:48:41 -0700 Subject: [PATCH 2/2] Add additional documentation --- ProcessMaker/Console/Commands/TenantsCreate.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ProcessMaker/Console/Commands/TenantsCreate.php b/ProcessMaker/Console/Commands/TenantsCreate.php index 6048bc68bc..43635aea58 100644 --- a/ProcessMaker/Console/Commands/TenantsCreate.php +++ b/ProcessMaker/Console/Commands/TenantsCreate.php @@ -198,7 +198,9 @@ public function handle() $this->line('- Run migrations and seed the database'); $this->line('- Run the install command for each package'); $this->line('- Run artisan upgrade'); - $this->line('- Install passport by calling passport:install'); + $this->line('- Install passport by calling passport:install (create the default clients'); + $this->line('- Reset the admin password with auth:set-password'); + $this->line('- Run processmaker:initialize-script-microservice'); $this->info("For example, `TENANT={$tenant->id} php artisan migrate:fresh --seed`"); } }