@@ -733,33 +733,25 @@ export class DataSchemaCompiler {
733
733
private async transpileJinjaFile (
734
734
file : FileContent ,
735
735
errorsReport : ErrorReporter ,
736
- { cubeNames , cubeSymbols , contextSymbols , transpilerNames , compilerId , stage } : TranspileOptions
736
+ options : TranspileOptions
737
737
) : Promise < ( FileContent | undefined ) > {
738
- // if (getEnv('transpilationNative')) {
739
- //
740
- // } else if (getEnv('transpilationWorkerThreads')) {
741
- //
742
- // } else {
743
738
const transpileJinjaFileTimer = perfTracker . start ( 'transpileJinjaFile (common)' ) ;
744
739
745
- const transpiledFile = await this . yamlCompiler . compileYamlWithJinjaFile (
740
+ const renderedFile = await this . yamlCompiler . renderTemplate (
746
741
file ,
747
- errorsReport ,
748
742
this . standalone ? { } : this . cloneCompileContextWithGetterAlias ( this . compileContext ) ,
749
743
this . pythonContext !
750
744
) ;
751
- if ( transpiledFile ) {
752
- // We update the jinja/yaml file content to the transpiled js content
753
- // and raise related flag so it will go JS transpilation flow afterward
754
- // avoiding costly YAML/Python parsing again.
755
- file . content = transpiledFile . content ;
756
- file . convertedToJs = true ;
757
- }
745
+
746
+ // We update the jinja/yaml file content to the rendered content
747
+ // to reuse the same transpileYamlFile() flow afterward which
748
+ // will update the content to the transpiled js content
749
+ // avoiding costly YAML/Python parsing again.
750
+ file . content = renderedFile . content ;
758
751
759
752
transpileJinjaFileTimer . end ( ) ;
760
753
761
- return transpiledFile ;
762
- // }
754
+ return this . transpileYamlFile ( file , errorsReport , options ) ;
763
755
}
764
756
765
757
public withQuery ( query , fn ) {
0 commit comments