Documentation / @zerotal/core / index / ConcernDescriptor
Interface: ConcernDescriptor
Defined in: conventions/ConventionLoader.ts:24
Describes one auto-registration concern: where to scan and how to register what it finds.
Properties
name
name:
string
Defined in: conventions/ConventionLoader.ts:26
Identifier, e.g. "models". Used as the config key for path overrides.
order
order:
number
Defined in: conventions/ConventionLoader.ts:28
Lower runs first (models=10, observers=20, policies=30, listeners=40, …).
dir?
optionaldir?:string
Defined in: conventions/ConventionLoader.ts:30
App-relative directory to scan, e.g. "app/models". Omit for one-shot concerns.
envs?
optionalenvs?:AppEnvironment[]
Defined in: conventions/ConventionLoader.ts:32
Environments this concern runs in. Default: all.
Methods
register()?
optionalregister(exports,ctx):void|Promise<void>
Defined in: conventions/ConventionLoader.ts:34
Register the relevant exports from one discovered module.
Parameters
exports
Record<string, unknown>
ctx
Returns
void | Promise<void>
run()?
optionalrun(ctx):void|Promise<void>
Defined in: conventions/ConventionLoader.ts:36
One-shot hook run once after this concern's files (or instead of scanning).
Parameters
ctx
Returns
void | Promise<void>