@@ -141,9 +141,7 @@ async function generateModels(context) {
141141 appsyncLocalConfig . forEach ( ( cfg , idx ) => {
142142 const outPutPath = cfg . filename ;
143143 fs . ensureFileSync ( outPutPath ) ;
144- const contentsToWrite = [ getVersionsMetadataComment ( context ) , generatedCode [ idx ] ] . filter ( content => content ) ;
145- const contentToWrite = contentsToWrite . join ( '\n\n' ) ;
146- fs . writeFileSync ( outPutPath , contentToWrite ) ;
144+ fs . writeFileSync ( outPutPath , generatedCode [ idx ] ) ;
147145 } ) ;
148146
149147 generateEslintIgnore ( context ) ;
@@ -199,29 +197,6 @@ function getModelOutputPath(context) {
199197 }
200198}
201199
202- // Generate a Comment string with Amplify CLI and Amplify Codegen version metadata
203- function getVersionsMetadataComment ( context ) {
204- const versionMetadata = [ ] ;
205- if ( context . usageData && context . usageData . version ) {
206- versionMetadata . push ( 'amplify-cli-version: ' + context . usageData . version ) ;
207- }
208-
209- if ( context . pluginPlatform && context . pluginPlatform . plugins ) {
210- const codegenPluginsInfo = context . pluginPlatform . plugins . codegen ;
211- if ( codegenPluginsInfo && codegenPluginsInfo . length > 0 ) {
212- const amplifyCodegenPluginInfo = codegenPluginsInfo . filter ( plugin => plugin . packageName == 'amplify-codegen' ) ;
213- if ( amplifyCodegenPluginInfo && amplifyCodegenPluginInfo . length > 0 && amplifyCodegenPluginInfo [ 0 ] . packageVersion ) {
214- versionMetadata . push ( 'amplify-codegen-version: ' + amplifyCodegenPluginInfo [ 0 ] . packageVersion ) ;
215- }
216- }
217- }
218-
219- if ( versionMetadata . length > 0 ) {
220- return '// Generated using ' + versionMetadata . join ( ', ' ) ;
221- }
222- return null ;
223- }
224-
225200function generateEslintIgnore ( context ) {
226201 const projectConfig = context . amplify . getProjectConfig ( ) ;
227202
0 commit comments