@@ -5,6 +5,7 @@ import { format } from "util";
55import { exported } from "../common/decorators" ;
66import { Hooks , TemplatesV2PackageJsonKeysToRemove } from "../constants" ;
77import * as temp from "temp" ;
8+ import { performanceLog } from "../common/decorators" ;
89
910export class ProjectService implements IProjectService {
1011
@@ -37,6 +38,7 @@ export class ProjectService implements IProjectService {
3738 }
3839
3940 @exported ( "projectService" )
41+ @performanceLog ( )
4042 public async createProject ( projectOptions : IProjectSettings ) : Promise < ICreateProjectData > {
4143 const projectName = await this . validateProjectName ( { projectName : projectOptions . projectName , force : projectOptions . force , pathToProject : projectOptions . pathToProject } ) ;
4244 const projectDir = this . getValidProjectDir ( projectOptions . pathToProject , projectName ) ;
@@ -120,6 +122,7 @@ export class ProjectService implements IProjectService {
120122 return { projectName, projectDir } ;
121123 }
122124
125+ @performanceLog ( )
123126 private async extractTemplate ( projectDir : string , templateData : ITemplateData ) : Promise < void > {
124127 this . $fs . ensureDirectoryExists ( projectDir ) ;
125128
@@ -142,6 +145,7 @@ export class ProjectService implements IProjectService {
142145 }
143146 }
144147
148+ @performanceLog ( )
145149 private async ensureAppResourcesExist ( projectDir : string ) : Promise < void > {
146150 const projectData = this . $projectDataService . getProjectData ( projectDir ) ;
147151 const appResourcesDestinationPath = projectData . getAppResourcesDirectoryPath ( projectDir ) ;
@@ -221,6 +225,7 @@ export class ProjectService implements IProjectService {
221225 } ;
222226 }
223227
228+ @performanceLog ( )
224229 private alterPackageJsonData ( projectDir : string , projectId : string ) : void {
225230 const projectFilePath = path . join ( projectDir , this . $staticConfig . PROJECT_FILE_NAME ) ;
226231
@@ -242,6 +247,7 @@ export class ProjectService implements IProjectService {
242247 this . $projectDataService . setNSValue ( projectDir , "id" , projectId ) ;
243248 }
244249
250+ @performanceLog ( )
245251 private async addTnsCoreModules ( projectDir : string ) : Promise < void > {
246252 const projectFilePath = path . join ( projectDir , this . $staticConfig . PROJECT_FILE_NAME ) ;
247253 const packageJsonData = this . $fs . readJson ( projectFilePath ) ;
0 commit comments