function_contracts library

Local project contract validation shared by generation and emulation.

Classes

FunctionCronSpec
A parsed cron expression: the admitted values of each field, ascending, and whether the two day fields were restricted (a restricted field is not the whole range). When both are restricted, a day matches when either does (Vixie cron).

Functions

parseFunctionCron(String expression) → FunctionCronSpec
Parses a cron expression or @ macro; throws FunctionCronException for anything else, with the TypeScript engine's message.
validateFunctionDefinitions(Object? value, {Set<String> modelNames = const {}, Set<String> queryNames = const {}, Set<String> fileCollectionNames = const {}}) → Map<String, Map<String, Object?>>
Validates structure against generated TypeBox tables, then semantic bounds. Returned definitions and all nested values are immutable and canonically ordered.

Exceptions / Errors

FunctionContractException
A deterministic configuration finding with a JSON pointer and repair hint.
FunctionCronException
Why an expression is not a cron expression the platform runs. The message is the TypeScript engine's for the same expression.