diff --git a/messages/orchestrator.rules.eval.md b/messages/orchestrator.rules.eval.md index 907e77e..53853e9 100644 --- a/messages/orchestrator.rules.eval.md +++ b/messages/orchestrator.rules.eval.md @@ -36,7 +36,7 @@ Path to Analytics variables.json file. # flags.variables.description -Path to the variables.json file containing variable definitions used in transformations. +Path to the variables.json file containing variable definitions used in transformations. The file should contain a flat JSON object with key-value pairs. The CLI will automatically wrap these in the required Variables structure. # flags.rules.summary diff --git a/src/commands/orchestrator/rules/eval.ts b/src/commands/orchestrator/rules/eval.ts index 32a1da9..94abe2d 100644 --- a/src/commands/orchestrator/rules/eval.ts +++ b/src/commands/orchestrator/rules/eval.ts @@ -183,7 +183,9 @@ export default class TemplateEval extends SfCommand { // Read variables file this.log(`Loading variables: ${variablesFile}`); const variablesContent = await fs.readFile(variablesFile, 'utf8'); - const values = JSON.parse(variablesContent) as { Variables: Record }; + const variablesData = JSON.parse(variablesContent) as Record; + + const values = { Variables: variablesData }; // Read rules file this.log(`Loading rules: ${rulesFile}`);