Export Engine, Secrets & Verification
Every export runs through a deterministic set of engine services under Totoglu\ProcessReactExportProfile\Engine\*.
Core Engine Services
Section titled “Core Engine Services”| Service | Responsibilities |
|---|---|
PreflightAuditor |
Classifies database tables (classifyTable()), discovers module classes (discoverModuleClassesInDirectory()), resolves status files, and detects orphan asset directories. |
ConfigCompiler |
Parses site/config.php assignments (parseConfigAssignments()), diffs against wire/config.php (findConfigDifferences()), compiles sanitized config.php (compileSiteConfig()), generates config-dev.php.example (compileConfigDevExample()), and writes install/info.php (compileInfoPhp()). |
SecretScanner |
Scans config diffs, module JSON settings, and contributor database rows (scan(), scrubModuleDataJson(), scrubContributorTableRow()), and collects exact redacted secret needles (collectRedactedSecretValuesForPlan()) for post-export verification. |
DatabaseExporter |
Exports ProcessWire tables and contributor-policy tables (full or schema-only) into install/install.sql, excluding the exporter module itself and optionally filtering user/session tables. |
FileArchiver |
Builds the filtered file manifest (buildManifest()), copies files in bounded batches (copyChunk(), default 250 files per step), and packs the verified ZIP archive (archiveDirectoryToZip()). |
FinishScriptGenerator |
Generates and syntax-checks (validatePhpSyntax()) the installer’s post-install finish script (generate()). |
ProfileVerifier |
Verifies the exported directory and/or ZIP archive (verify()) for required ProcessWire installer files and scans every text/SQL/PHP artifact against redacted secret needles. |
ChunkedExportRunner |
Coordinates the 6 resumable steps (startJob(), runStep(), runAll()) with actor binding (getJobActorId()) and file locks (withJobLock(), withSlugLock()). |
Background Queue Exports (ExportProfileQueue)
Section titled “Background Queue Exports (ExportProfileQueue)”For multi-gigabyte sites or CI webhooks, dispatch the export into processwire-console’s background queue via ExportProfileRuntime::dispatchQueueExport($plan) or CLI:
php vendor/bin/wire profile:export \ --preset=client-handoff \ --target=aegean-voyages-handoff \ --queue \ --force \ --jsonCheck ExportProfileRuntime::isConsoleQueueAvailable() in PHP to verify whether trk/processwire-console queue workers are active before dispatching.