fix(core): update
This commit is contained in:
		@@ -3,7 +3,6 @@ import * as plugins from '../plugins.js';
 | 
			
		||||
import { ProjectContext } from './projectcontext.js';
 | 
			
		||||
 | 
			
		||||
export class Readme {
 | 
			
		||||
 | 
			
		||||
  // INSTANCE
 | 
			
		||||
  private aiDocsRef: AiDoc;
 | 
			
		||||
  private projectDir: string;
 | 
			
		||||
@@ -21,8 +20,10 @@ export class Readme {
 | 
			
		||||
    const contextString = await projectContext.update();
 | 
			
		||||
 | 
			
		||||
    // lets first check legal before introducung any cost
 | 
			
		||||
    const npmExtraJson = JSON.parse(((await projectContext.gatherFiles()).smartfilesNpmextraJSON).contents.toString());
 | 
			
		||||
    const legalInfo = npmExtraJson?.tsdoc?.legal
 | 
			
		||||
    const npmExtraJson = JSON.parse(
 | 
			
		||||
      (await projectContext.gatherFiles()).smartfilesNpmextraJSON.contents.toString(),
 | 
			
		||||
    );
 | 
			
		||||
    const legalInfo = npmExtraJson?.tsdoc?.legal;
 | 
			
		||||
    if (!legalInfo) {
 | 
			
		||||
      const error = new Error(`No legal information found in npmextra.json`);
 | 
			
		||||
      console.log(error);
 | 
			
		||||
@@ -67,12 +68,9 @@ The Readme should follow the following template:
 | 
			
		||||
      messageHistory: [],
 | 
			
		||||
      userMessage: contextString,
 | 
			
		||||
    });
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    finalReadmeString += result.message + '\n' + legalInfo;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    console.log(`\n======================\n`);
 | 
			
		||||
    console.log(result.message);
 | 
			
		||||
    console.log(`\n======================\n`);
 | 
			
		||||
@@ -83,4 +81,4 @@ The Readme should follow the following template:
 | 
			
		||||
 | 
			
		||||
    return result.message;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user