Summary
In packages/cli/src/commands/generate/job/jobHandler.js at line 48–50, the name field is passed redundantly in templateVars:
templateVars: { name: jobName, queueName, ...rest },
The templateForFile helper (in yargsHandlerHelpers.js) already includes name from its top-level parameter in mergedTemplateVars:
const mergedTemplateVars = {
name, // already set from templateForFile's own `name` arg
outputPath: ...,
...templateVars, // templateVars.name currently overwrites the above (same value)
}
Since templateVars is spread after name, passing name: jobName inside templateVars is a no-op — it just overwrites name with the same value. The TODO comment at line 48 explicitly calls this out:
// TODO: Remove name here. It's already passed to the template by the helper function we're using
Fix
Remove name: jobName from the templateVars object in the first templateForFile call:
// Before
templateVars: { name: jobName, queueName, ...rest },
// After
templateVars: { queueName, ...rest },
Files
packages/cli/src/commands/generate/job/jobHandler.js — line 50, remove name: jobName from templateVars
Notes
Summary
In
packages/cli/src/commands/generate/job/jobHandler.jsat line 48–50, thenamefield is passed redundantly intemplateVars:The
templateForFilehelper (inyargsHandlerHelpers.js) already includesnamefrom its top-level parameter inmergedTemplateVars:Since
templateVarsis spread aftername, passingname: jobNameinsidetemplateVarsis a no-op — it just overwritesnamewith the same value. The TODO comment at line 48 explicitly calls this out:Fix
Remove
name: jobNamefrom thetemplateVarsobject in the firsttemplateForFilecall:Files
packages/cli/src/commands/generate/job/jobHandler.js— line 50, removename: jobNamefromtemplateVarsNotes
templateForFilecalls in the same file (for test and scenario files) already omitnamefromtemplateVars(they just use{ ...rest }), confirming this pattern is intentional.