@@ -46,7 +46,11 @@ const contentPath = path.resolve(`${__dirname}/content-sources/node`);
4646const tempHomePath = path . resolve ( `${ contentPath } /HOME_TEMP.md` ) ;
4747const devsitePath = `/docs/reference/admin/node/` ;
4848
49- const firestoreExcludes = [ 'v1' , 'v1beta1' , 'setLogFunction' , 'DocumentData' ] ;
49+ const firestoreExcludes = [
50+ 'v1' , 'v1beta1' , 'setLogFunction' , 'DocumentData' ,
51+ 'BulkWriterOptions' , 'DocumentChangeType' , 'FirestoreDataConverter' ,
52+ 'GrpcStatus' , 'Precondition' , 'ReadOptions' , 'UpdateData' , 'Settings' ,
53+ ] ;
5054const firestoreHtmlPath = `${ docPath } /admin.firestore.html` ;
5155const firestoreHeader = `<section class="tsd-panel-group tsd-member-group ">
5256 <h2>Type aliases</h2>
@@ -278,6 +282,18 @@ function updateHtml(htmlPath, contentBlock) {
278282 const dom = new jsdom . JSDOM ( fs . readFileSync ( htmlPath ) ) ;
279283 const contentNode = dom . window . document . body . querySelector ( '.col-12' ) ;
280284
285+ // Recent versions of Typedoc generates an additional index section and a variables
286+ // section for namespaces with re-exports. We iterate through these nodes and remove
287+ // them from the output.
288+ const sections = [ ] ;
289+ contentNode . childNodes . forEach ( ( child ) => {
290+ if ( child . nodeName === 'SECTION' ) {
291+ sections . push ( child ) ;
292+ }
293+ } ) ;
294+ contentNode . removeChild ( sections [ 1 ] ) ;
295+ contentNode . removeChild ( sections [ 2 ] ) ;
296+
281297 const newSection = new jsdom . JSDOM ( contentBlock ) ;
282298 contentNode . appendChild ( newSection . window . document . body . firstChild ) ;
283299 fs . writeFileSync ( htmlPath , dom . window . document . documentElement . outerHTML ) ;
0 commit comments