File tree Expand file tree Collapse file tree
plugins/NpgsqlRest.TsClient Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11071107 //
11081108 "ExportEventSources" : true ,
11091109 //
1110- // List if custom imports to add to the generated code. It adds line to a file. Use full expression like `import { MyType } from './my-type';`
1110+ // List of custom imports to add to the generated code. It adds line to a file. Use full expression like `import { MyType } from './my-type';`
11111111 //
11121112 "CustomImports" : [],
11131113 //
1114- // List if custom headers to add to the each request in generated code. Header key is automatically quoted if it doesn't contain quotes.
1114+ // Dictionary of custom headers to add to the each request in generated code. Header key is automatically quoted if it doesn't contain quotes.
11151115 //
11161116 "CustomHeaders" : {}
11171117 },
Original file line number Diff line number Diff line change @@ -190,7 +190,24 @@ options.ImportBaseUrlFrom is not null ?
190190 {
191191 if ( File . Exists ( fileName ) )
192192 {
193- File . WriteAllText ( fileName , content . ToString ( ) ) ;
193+ try
194+ {
195+ File . Delete ( fileName ) ;
196+ _logger ? . LogInformation ( "Deleted file: {fileName}" , fileName ) ;
197+ }
198+ catch ( Exception ex )
199+ {
200+ _logger ? . LogError ( ex , "Failed to delete file: {fileName}" , fileName ) ;
201+
202+ try
203+ {
204+ File . WriteAllText ( fileName , "// No endpoints found." ) ;
205+ }
206+ catch ( Exception ex2 )
207+ {
208+ _logger ? . LogError ( ex2 , "Failed to empty file: {fileName}" , fileName ) ;
209+ }
210+ }
194211 }
195212 }
196213 return ;
You can’t perform that action at this time.
0 commit comments