@@ -85,10 +85,10 @@ export default class TemplateEval extends SfCommand<TemplatePreviewResult> {
8585 summary : messages . getMessage ( 'flags.api-version.summary' ) ,
8686 description : messages . getMessage ( 'flags.api-version.description' ) ,
8787 } ) ,
88- 'template-info' : Flags . file ( {
89- char : 't ' ,
90- summary : messages . getMessage ( 'flags.template-info .summary' ) ,
91- description : messages . getMessage ( 'flags.template-info .description' ) ,
88+ document : Flags . file ( {
89+ char : 'd ' ,
90+ summary : messages . getMessage ( 'flags.document .summary' ) ,
91+ description : messages . getMessage ( 'flags.document .description' ) ,
9292 required : true ,
9393 } ) ,
9494 variables : Flags . file ( {
@@ -159,26 +159,26 @@ export default class TemplateEval extends SfCommand<TemplatePreviewResult> {
159159 }
160160 }
161161
162- private async getTemplatePayload ( flags : { 'template-info' : string ; variables : string ; rules : string } ) : Promise < {
162+ private async getTemplatePayload ( flags : { document : string ; variables : string ; rules : string } ) : Promise < {
163163 template : TemplateInfo ;
164164 payload : TransformationPayload ;
165165 } > {
166- return this . getDirectFilePayload ( flags [ 'template-info' ] , flags [ ' variables' ] , flags [ ' rules' ] ) ;
166+ return this . getDirectFilePayload ( flags . document , flags . variables , flags . rules ) ;
167167 }
168168
169169 private async getDirectFilePayload (
170- templateInfoFile : string ,
170+ documentFile : string ,
171171 variablesFile : string ,
172172 rulesFile : string
173173 ) : Promise < {
174174 template : TemplateInfo ;
175175 payload : TransformationPayload ;
176176 } > {
177- this . log ( `Loading template info : ${ templateInfoFile } ` ) ;
177+ this . log ( `Loading document : ${ documentFile } ` ) ;
178178
179- // Read and parse the template-info file
180- const templateInfoContent = await fs . readFile ( templateInfoFile , 'utf8' ) ;
181- const document = JSON . parse ( templateInfoContent ) as unknown ;
179+ // Read and parse the document file
180+ const documentContent = await fs . readFile ( documentFile , 'utf8' ) ;
181+ const document = JSON . parse ( documentContent ) as unknown ;
182182
183183 // Read variables file
184184 this . log ( `Loading variables: ${ variablesFile } ` ) ;
@@ -193,7 +193,7 @@ export default class TemplateEval extends SfCommand<TemplatePreviewResult> {
193193 return {
194194 template : {
195195 name : 'Direct Files' ,
196- path : templateInfoFile ,
196+ path : documentFile ,
197197 source : 'local' as const ,
198198 } ,
199199 payload : {
0 commit comments