feat(declare)!: parse role=declare blocks as YAML
Replace the tag/threshold/key/expr CSV body with YAML `vars:` and `tags:` maps. `parseDeclare` validates the body with an exported Zod schema and returns the same declaration and modifier shapes the reactivity engine already consumes. The breaking rename from `parseDeclareCsv` updates the registry, the journal re-exports, and the `tttk check` role checks, where R003 now reports schema errors with their path and R004 warns when a block declares nothing.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
*/
|
||||
|
||||
export {
|
||||
parseDeclareCsv,
|
||||
parseDeclare,
|
||||
declareSchema,
|
||||
type VarDeclaration,
|
||||
type TagModifier,
|
||||
type DeclareResult,
|
||||
|
||||
@@ -56,7 +56,7 @@ export type { ParsedInput, CompletionItem } from "./command-parser";
|
||||
export { buildCompletions } from "./command-completions";
|
||||
export type { CompletionsContext } from "./command-completions";
|
||||
export { VariableView } from "./VariableView";
|
||||
export { parseDeclareCsv } from "./declare-parser";
|
||||
export { parseDeclare, declareSchema } from "./declare-parser";
|
||||
export type { VarDeclaration, TagModifier } from "./declare-parser";
|
||||
export { evaluateExpression, expressionIsTag, exprValueToString } from "./variable-expression";
|
||||
export type { EvalContext, EvalResult, ExprValue } from "./variable-expression";
|
||||
|
||||
Reference in New Issue
Block a user