ProtectedcommandBEFORE/AFTER external command failures captured during a pipeline run, so the structured result can fail (success=false, non-zero exit) AND report which command failed — instead of the legacy log-only path that exited 0 regardless.
ProtectedexecuteCore CodeGen pipeline logic shared by Run() and RunInProcess(). Accepts an existing data source — does NOT create connections or call process.exit().
ProtectedrecordRecord any failed entries from a BEFORE/AFTER command batch, paired by index.
Command line arguments
The command to execute
Optionaltimeout?: number | nullOptional timeout in milliseconds
When to run the command (e.g., 'before', 'after')
Working directory to run the command from
ProtectedrunRuns the file-generation phase of CodeGen: GraphQL resolvers, entity
subclasses (core + non-core), Angular components, DB schema JSON, and
action subclasses. Extracted so the caller can skip this phase entirely
via --skipfiles / skip_file_generation = true without re-indenting
the existing generator logic.
true on success, false if any generator reported a fatal error.
Run CodeGen in-process with an existing data source. Does NOT create a new DB connection or call process.exit(). Designed for use by RuntimeSchemaManager inside a running MJAPI process.
OptionalworkingDirectory: stringRun CodeGen and return a structured MJCLIResult instead of calling
process.exit(). Used by the pluggable mj codegen plugin so the runtime
host can render the result per --format before the CLI exits.
Acquire the per-platform data source for a CodeGen run.
Dispatches via MJGlobal.Instance.ClassFactory.CreateInstance(CodeGenDatabaseProvider, platform)
— the same factory pattern used elsewhere in CodeGen (see e.g.
manage-metadata.ts's get dbProvider()). The actual pool / provider /
user-loading lives on the resolved subclass's SetupDataSource()
method, so adding a new platform means registering a new provider, not
touching the orchestrator.
Throws when no provider is registered for configInfo.dbPlatform —
ClassFactory.CreateInstance returns the abstract base on a missed
lookup, so we disambiguate by constructor identity.
Main orchestrator class for the MemberJunction code generation process.