File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ export async function convertFiles(
134134 ( filename ) => ( { filename } ) as WorkspaceFile
135135 )
136136
137+ const stats : object [ ] = [ ]
137138 const usage = new GenerationStats ( "" )
138139 const results : Record < string , string > = { }
139140 const p = new PLimitPromiseQueue ( normalizeInt ( concurrency ) || 1 )
@@ -232,6 +233,7 @@ export async function convertFiles(
232233 results [ file . filename ] = text
233234 const end = m ( )
234235 usage . addUsage ( result . stats , end )
236+ if ( result . stats ) stats . push ( result . stats )
235237 } catch ( error ) {
236238 logError ( error )
237239 fileTrace . error ( undefined , error )
@@ -242,5 +244,8 @@ export async function convertFiles(
242244 } )
243245
244246 usage . log ( )
247+ usage . trace ( convertTrace )
248+
249+ convertTrace . table ( stats )
245250 logVerbose ( `trace: ${ outTraceFilename } ` )
246251}
Original file line number Diff line number Diff line change 108108 "typecheck" : " tsc -p src" ,
109109 "prompts:bundle" : " node bundleprompts.js" ,
110110 "pretypecheck" : " yarn prompts:bundle" ,
111+ "pretty" : " prettier **.ts --write" ,
111112 "test" : " node --import tsx --test src/**.test.*ts"
112113 },
113114 "dependencies" : {
Original file line number Diff line number Diff line change @@ -16,11 +16,8 @@ const file = env.files[0]
1616
1717const prettier = async ( file ) => {
1818 // format
19- const res = await host . exec ( "prettier" , [
20- "--write" ,
21- file . filename ,
22- ] )
23- if ( ! res . exitCode ) throw new Error ( res . stderr )
19+ const res = await host . exec ( "prettier" , [ "--write" , file . filename ] )
20+ if ( res . exitCode ) throw new Error ( `${ res . stdout } (${ res . exitCode } )` )
2421}
2522
2623// normalize spacing
@@ -70,7 +67,7 @@ for (const match of matches) {
7067 responseType : "text" ,
7168 flexTokens : 12000 ,
7269 label : match . child ( 0 ) . text ( ) ,
73- temperature : 0.2
70+ temperature : 0.2 ,
7471 }
7572 )
7673 // if generation is successful, insert the docs
You can’t perform that action at this time.
0 commit comments