File tree 3 files changed +21
-11
lines changed 3 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ async function readExtraContentFrom(source) {
137
137
const reader = readline . createInterface ( {
138
138
input : fs . createReadStream ( source ) ,
139
139
} ) ;
140
- const content = [ '' ] ;
140
+ const content = [ ] ;
141
141
for await ( const line of reader ) {
142
142
content . push ( line ) ;
143
143
}
@@ -150,11 +150,20 @@ async function writeExtraContentTo(target, extra) {
150
150
const reader = readline . createInterface ( {
151
151
input : fs . createReadStream ( target ) ,
152
152
} ) ;
153
+
154
+ let firstHeadingSeen = false ;
153
155
for await ( const line of reader ) {
154
- output . push ( line ) ;
155
- if ( line . startsWith ( '{% block body %}' ) ) {
156
- output . push ( ...extra ) ;
156
+ // Insert extra content just before the first markdown heading.
157
+ if ( line . match ( / ^ \# + / ) ) {
158
+ if ( ! firstHeadingSeen ) {
159
+ output . push ( ...extra ) ;
160
+ output . push ( '' ) ;
161
+ }
162
+
163
+ firstHeadingSeen = true ;
157
164
}
165
+
166
+ output . push ( line ) ;
158
167
}
159
168
160
169
const outputBuffer = Buffer . from ( output . join ( '\r\n' ) ) ;
Original file line number Diff line number Diff line change 20
20
"test:coverage" : " nyc npm run test:unit" ,
21
21
"lint:src" : " eslint src/ --ext .ts" ,
22
22
"lint:test" : " eslint test/ --ext .ts" ,
23
- "apidocs" : " run-s api-extractor:local api-documenter api-documenter:toc api-documenter:post " ,
23
+ "apidocs" : " run-s api-extractor:local api-documenter" ,
24
24
"api-extractor" : " node generate-reports.js" ,
25
25
"api-extractor:local" : " npm run build && node generate-reports.js --local" ,
26
26
"esm-wrap" : " node generate-esm-wrapper.js" ,
27
- "api-documenter" : " api-documenter-fire markdown --input temp --output docgen/markdown -s" ,
27
+ "api-documenter" : " run-s api-documenter:markdown api-documenter:toc api-documenter:post" ,
28
+ "api-documenter:markdown" : " api-documenter-fire markdown --input temp --output docgen/markdown -s" ,
28
29
"api-documenter:toc" : " api-documenter-fire toc --input temp --output docgen/markdown -p /docs/reference/admin/node -s" ,
29
30
"api-documenter:post" : " node docgen/post-process.js"
30
31
},
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import { app } from '../firebase-namespace-api';
42
42
* @param app Optional app for which to return the `AppCheck` service.
43
43
* If not provided, the default `AppCheck` service is returned.
44
44
*
45
- * @return The default `AppCheck` service if no
45
+ * @returns The default `AppCheck` service if no
46
46
* app is provided, or the `AppCheck` service associated with the provided
47
47
* app.
48
48
*/
@@ -59,10 +59,10 @@ export namespace appCheck {
59
59
/**
60
60
* Creates a new {@link appCheck.AppCheckToken `AppCheckToken`} that can be sent
61
61
* back to a client.
62
- *
62
+ *
63
63
* @param appId The App ID of the Firebase App the token belongs to.
64
64
*
65
- * @return A promise that fulfills with a `AppCheckToken`.
65
+ * @returns A promise that fulfills with a `AppCheckToken`.
66
66
*/
67
67
createToken ( appId : string ) : Promise < AppCheckToken > ;
68
68
@@ -73,7 +73,7 @@ export namespace appCheck {
73
73
*
74
74
* @param appCheckToken The App Check token to verify.
75
75
*
76
- * @return A promise fulfilled with the
76
+ * @returns A promise fulfilled with the
77
77
* token's decoded claims if the App Check token is valid; otherwise, a rejected
78
78
* promise.
79
79
*/
@@ -146,7 +146,7 @@ export namespace appCheck {
146
146
app_id : string ;
147
147
[ key : string ] : any ;
148
148
}
149
-
149
+
150
150
/**
151
151
* Interface representing a verified App Check token response.
152
152
*/
You can’t perform that action at this time.
0 commit comments