24 lines
1.7 KiB
PHP
24 lines
1.7 KiB
PHP
<?php
|
|
|
|
// No Laravel bootstrap, connection, command execution or application configuration mutation.
|
|
require __DIR__.'/lib/SgfWorkflowInventory.php';
|
|
if ($argc !== 3) {
|
|
fwrite(STDERR, "Usage: php scripts/sgf-workflow-inventory.php <accepted-bundle> <manifest-sha256>\n");
|
|
exit(2);
|
|
}
|
|
$processes = [
|
|
'context_permissions' => ['app/Services/WorkContext.php', 'app/Models/Concerns/HasWorkContext.php', 'app/Services/CurrentActor.php', 'app/Services/OrganizationAccess.php'],
|
|
'requisition_budget' => ['app/Services/RequisitionWorkflow.php', 'app/Services/BudgetWorkflow.php', 'app/Services/InternalRequisitionPort.php', 'app/Models/Requisition.php'],
|
|
'sourcing_award' => ['app/Services/PurchaseWorkflow.php', 'app/Services/ProposalComparison.php', 'app/Services/ConflictGuard.php', 'app/Services/ConflictReleases.php'],
|
|
'orders_receipts' => ['app/Services/ReceiptWorkflow.php', 'app/Services/OrderCancellationWorkflow.php', 'app/Policies/GoodsReceiptPolicy.php', 'app/Services/ReceiptDocuments.php'],
|
|
'obligations' => ['app/Services/InvoiceWorkflow.php', 'app/Services/SupplierPayables.php'],
|
|
'warehouse' => ['app/Services/StockWorkflow.php', 'app/Services/WarehouseRequests.php', 'app/Services/WarehouseReservations.php', 'app/Services/WarehouseFulfilment.php'],
|
|
'replenishment' => ['app/Services/SupplyPlanning.php', 'app/Services/SupplySuggestions.php', 'app/Services/AutomaticPurchases.php'],
|
|
];
|
|
try {
|
|
echo json_encode(SgfWorkflowInventory::inspect(dirname(__DIR__), $argv[1], $argv[2], $processes), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR).PHP_EOL;
|
|
} catch (Throwable $error) {
|
|
fwrite(STDERR, $error->getMessage().PHP_EOL);
|
|
exit(1);
|
|
}
|