@@ -132,32 +132,24 @@ export async function generateDescriptions(): Promise<{
132
132
}
133
133
134
134
const results : Record < string , any > = { } ;
135
- try {
136
- const indexPaths = await walkDirectory ( basePath ) ;
137
-
138
- await Promise . all (
139
- indexPaths . map ( async ( fileURL ) => {
140
- try {
141
- const content = await fs . readFile ( fileURL , "utf-8" ) ;
142
- const slug = generateSlug ( content ) ;
143
- const types = generateTypes ( content ) ;
144
- if ( ! slug || slug . length === 0 || ( types && types [ 0 ] === "ignore" ) )
145
- return ;
146
-
147
- const summary = extractSummary ( content ) ;
148
- if (
149
- summary ===
150
- "When writing code for the Web, there are a large number of Web APIs available."
151
- )
152
- console . log ( types , slug , summary ) ;
153
- insertComment ( results , slug , summary , types ) ;
154
- } catch ( error ) {
155
- console . error ( "Error generating API descriptions:" , error ) ;
156
- }
157
- } ) ,
158
- ) ;
159
- } catch ( err ) {
160
- console . error ( "Error generating API descriptions:" , err ) ;
161
- }
135
+ const indexPaths = await walkDirectory ( basePath ) ;
136
+
137
+ await Promise . all (
138
+ indexPaths . map ( async ( fileURL ) => {
139
+ const content = await fs . readFile ( fileURL , "utf-8" ) ;
140
+ const slug = generateSlug ( content ) ;
141
+ const types = generateTypes ( content ) ;
142
+ if ( ! slug || slug . length === 0 || ( types && types [ 0 ] === "ignore" ) )
143
+ return ;
144
+
145
+ const summary = extractSummary ( content ) ;
146
+ if (
147
+ summary ===
148
+ "When writing code for the Web, there are a large number of Web APIs available."
149
+ )
150
+ console . log ( types , slug , summary ) ;
151
+ insertComment ( results , slug , summary , types ) ;
152
+ } ) ,
153
+ ) ;
162
154
return { interfaces : { interface : results } } ;
163
155
}
0 commit comments