MCPcopy Create free account
hub / github.com/angular/dev-infra / processExtractorMessage

Function processExtractorMessage

bazel/api-golden/test_api_report.ts:159–170  ·  view source on GitHub ↗

* Process an API extractor message. Microsoft's API extractor allows developers to * handle messages before API extractor prints them. This allows us to adjust log level * for certain messages, or to fully prevent messages from being printed out. *

(message: ExtractorMessage)

Source from the content-addressed store, hash-verified

157 await fs.promises.rm(reportTmpOutPath);
158 return reportOut;
159}
160
161/**
162 * Process an API extractor message. Microsoft's API extractor allows developers to
163 * handle messages before API extractor prints them. This allows us to adjust log level
164 * for certain messages, or to fully prevent messages from being printed out.
165 * */
166async function processExtractorMessage(message: ExtractorMessage) {
167 // If the golden does not match, we hide the error as API extractor prints
168 // a warning asking the user to manually copy the new API report. We print
169 // a custom warning below asking the developer to run the `.accept` Bazel target.
170 // TODO: Simplify once https://github.com/microsoft/rushstack/issues/2773 is resolved.
171 if (message.messageId === ConsoleMessageId.ApiReportNotCopied) {
172 // Mark the message as handled so that API-extractor does not print it. We print
173 // a message manually after extraction.

Callers 1

testApiGoldenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected