@@ -46,7 +46,11 @@ const contentPath = path.resolve(`${__dirname}/content-sources/node`);
46
46
const tempHomePath = path . resolve ( `${ contentPath } /HOME_TEMP.md` ) ;
47
47
const devsitePath = `/docs/reference/admin/node/` ;
48
48
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
+ ] ;
50
54
const firestoreHtmlPath = `${ docPath } /admin.firestore.html` ;
51
55
const firestoreHeader = `<section class="tsd-panel-group tsd-member-group ">
52
56
<h2>Type aliases</h2>
@@ -278,6 +282,18 @@ function updateHtml(htmlPath, contentBlock) {
278
282
const dom = new jsdom . JSDOM ( fs . readFileSync ( htmlPath ) ) ;
279
283
const contentNode = dom . window . document . body . querySelector ( '.col-12' ) ;
280
284
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
+
281
297
const newSection = new jsdom . JSDOM ( contentBlock ) ;
282
298
contentNode . appendChild ( newSection . window . document . body . firstChild ) ;
283
299
fs . writeFileSync ( htmlPath , dom . window . document . documentElement . outerHTML ) ;
0 commit comments