Ir al contenido

ModuleDefinitionSchema

@aurorajs.dev/catalyst-cli


@aurorajs.dev/catalyst-cli / generator/domain/model / ModuleDefinitionSchema

Defined in: generator/domain/model.ts:281

Full schema for a generated module. This is the in-memory representation loaded from cliter/<bc>/<module>.aurora.yaml, after validation and default-filling.

optional additionalApis?: AdditionalApi[]

Defined in: generator/domain/model.ts:282


aggregateName: string

Defined in: generator/domain/model.ts:283


aggregateProperties: Property[]

Defined in: generator/domain/model.ts:284


boundedContextName: string

Defined in: generator/domain/model.ts:285


optional excludedFiles?: string[]

Defined in: generator/domain/model.ts:287

Templates skipped when generating this module.


optional excludedOperations?: string[]

Defined in: generator/domain/model.ts:289

CRUD operations skipped when generating this module.


optional front?: object

Defined in: generator/domain/model.ts:291

Frontend-only presentation metadata (icon, grammatical gender, …).

optional detailMode?: DetailMode

How the detail surface is presented. See DetailMode. Default 'view' (routed page). 'dialog' embeds the form inside the list.

optional dialogWidth?: DialogWidth

Named-token width of the create/edit dialog. See DialogWidth. Only applies when detailMode: 'dialog'; inert (read by no template) in 'view' mode. Default 'md'.

optional displayField?: string

Human-readable display label for this aggregate. Accepts two shapes detected automatically by the codegen:

  • Identifier shape: a bare JS identifier (matches /^[a-zA-Z_$][a-zA-Z0-9_$]*$/) naming a single property — e.g. 'email'. Used directly as a property reference.
  • Template shape: an interpolation template containing one or more {<identifier>} placeholders — e.g. '{code} - {name}'. The codegen substitutes each placeholder with <row>.<identifier> at emit time. Anything that doesn’t match the placeholder grammar (including {}, {not.a.field}, {123invalid}) is emitted verbatim. Consumed by list-component delete-toast text, FK column auto-include accessors, and FK column header rendering. Defaults to 'name' (identifier shape) when unset. See openspec/specs/frontend-module-generator/spec.md → “Schema — front.displayField attribute”.

optional embedSupport?: boolean

SPEC-15: when true, the module generates embed-mode artifacts (*-form-embed.component.ts, getXEmbedColumns factory in *.columns.ts, mode polymorphic input on the list-component). Required when another module references this one via widget.type: grid-elements-manager. Default false.

optional gender?: Gender

Grammatical gender of the module’s singular noun. Used by the generator to pick F/M variants from the global i18n JSON (e.g. New.F → “Nueva”, New.M → “Nuevo”). Ignored by languages without grammatical gender.

optional outlineFontSetIcon?: string

optional outlineIcon?: string

optional solidFontSetIcon?: string

optional solidIcon?: string


hasAuditing: boolean

Defined in: generator/domain/model.ts:342


optional hasCustomFields?: boolean

Defined in: generator/domain/model.ts:353

Emits the hasCustomFields satellite value table + wiring (design.md D2, add-custom-fields change): <bc>_<module>_custom_field_value, its one-to-many Drizzle relation, the per-BC relation whitelist entry, the GraphQL field + resolver, and the FieldSchema relation entry. Optional and default-absent — UNLIKE hasOAuth/hasTenant/hasAuditing, it is NOT in schema-loader.ts’s validateSchema() required list: every existing .aurora.yaml (in this repo and consumer repos) must keep working without declaring it (non-breaking opt-in).


hasOAuth: boolean

Defined in: generator/domain/model.ts:354


hasTenant: boolean

Defined in: generator/domain/model.ts:355


optional i18nStrategy?: "embedded" | "table"

Defined in: generator/domain/model.ts:365

How isI18n: true properties are persisted (design.md D1, add-i18n-embedded-codegen change). 'embedded' (default when absent) stores the translated map + search text as columns on the aggregate’s own table (design.md D2/D3). 'table' is recognized but NOT YET emitted — its companion-table codegen is deferred to a follow-up change (design.md Non-Goals). Mirrors hasCustomFields: optional, default-absent, non-breaking for every existing .aurora.yaml.


moduleName: string

Defined in: generator/domain/model.ts:366


moduleNames: string

Defined in: generator/domain/model.ts:367