when set to true, no updates are written back to the database - which happens after code generation when newly generated code from AI has been generated, but in the case where this flag is true, we don't ever write back to the DB because the assumption is we are only emitting code to the file that was already in the DB.
Generates the description string for a Zod schema field, including field metadata, value list documentation, and JSONType annotations with entity-prefixed type names.
The entity field to generate a description for
Optionalentity: EntityInfoOptional entity context, used to compute the entity-prefixed JSONType name
A formatted description string for the Zod .describe() call
ProtectedgetFinds the source parent entity for an IS-A inherited field by walking the parent chain. Returns the name of the parent entity that originally defines the field (as a non-virtual column).
Protected StaticSanitizeEscapes sequences in description text that would break generated code. Handles JSDoc comment terminators, nested comment openers, backticks, and template literal interpolation sequences.
Protected StaticValidateValidates that a JSONTypeDefinition string contains valid TypeScript and (optionally) exports the expected type name. Uses the TypeScript compiler API to parse without writing any files to disk.
The raw TypeScript code from EntityField.JSONTypeDefinition
The JSONType name that should be defined/exported in the definition
Entity name for error messages
Field name for error messages
An object with valid boolean and optional errors array of diagnostic messages
Base class for generating entity sub-classes, you can sub-class this class to modify/extend your own entity sub-class generator logic