@microsoft/api-extractor 7.56.3 → 7.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +29 -0
- package/CHANGELOG.md +8 -1
- package/bin/api-extractor +1 -1
- package/lib-esm/aedoc/PackageDocComment.js +56 -0
- package/lib-esm/aedoc/PackageDocComment.js.map +1 -0
- package/lib-esm/analyzer/AstDeclaration.js +214 -0
- package/lib-esm/analyzer/AstDeclaration.js.map +1 -0
- package/lib-esm/analyzer/AstEntity.js +35 -0
- package/lib-esm/analyzer/AstEntity.js.map +1 -0
- package/lib-esm/analyzer/AstImport.js +76 -0
- package/lib-esm/analyzer/AstImport.js.map +1 -0
- package/lib-esm/analyzer/AstModule.js +22 -0
- package/lib-esm/analyzer/AstModule.js.map +1 -0
- package/lib-esm/analyzer/AstNamespaceExport.js +38 -0
- package/lib-esm/analyzer/AstNamespaceExport.js.map +1 -0
- package/lib-esm/analyzer/AstNamespaceImport.js +57 -0
- package/lib-esm/analyzer/AstNamespaceImport.js.map +1 -0
- package/lib-esm/analyzer/AstReferenceResolver.js +202 -0
- package/lib-esm/analyzer/AstReferenceResolver.js.map +1 -0
- package/lib-esm/analyzer/AstSymbol.js +104 -0
- package/lib-esm/analyzer/AstSymbol.js.map +1 -0
- package/lib-esm/analyzer/AstSymbolTable.js +524 -0
- package/lib-esm/analyzer/AstSymbolTable.js.map +1 -0
- package/lib-esm/analyzer/ExportAnalyzer.js +725 -0
- package/lib-esm/analyzer/ExportAnalyzer.js.map +1 -0
- package/lib-esm/analyzer/PackageMetadataManager.js +235 -0
- package/lib-esm/analyzer/PackageMetadataManager.js.map +1 -0
- package/lib-esm/analyzer/SourceFileLocationFormatter.js +44 -0
- package/lib-esm/analyzer/SourceFileLocationFormatter.js.map +1 -0
- package/lib-esm/analyzer/Span.js +545 -0
- package/lib-esm/analyzer/Span.js.map +1 -0
- package/lib-esm/analyzer/SyntaxHelpers.js +72 -0
- package/lib-esm/analyzer/SyntaxHelpers.js.map +1 -0
- package/lib-esm/analyzer/TypeScriptHelpers.js +242 -0
- package/lib-esm/analyzer/TypeScriptHelpers.js.map +1 -0
- package/lib-esm/analyzer/TypeScriptInternals.js +114 -0
- package/lib-esm/analyzer/TypeScriptInternals.js.map +1 -0
- package/lib-esm/api/CompilerState.js +149 -0
- package/lib-esm/api/CompilerState.js.map +1 -0
- package/lib-esm/api/ConsoleMessageId.js +82 -0
- package/lib-esm/api/ConsoleMessageId.js.map +1 -0
- package/lib-esm/api/Extractor.js +290 -0
- package/lib-esm/api/Extractor.js.map +1 -0
- package/lib-esm/api/ExtractorConfig.js +801 -0
- package/lib-esm/api/ExtractorConfig.js.map +1 -0
- package/lib-esm/api/ExtractorLogLevel.js +46 -0
- package/lib-esm/api/ExtractorLogLevel.js.map +1 -0
- package/lib-esm/api/ExtractorMessage.js +140 -0
- package/lib-esm/api/ExtractorMessage.js.map +1 -0
- package/lib-esm/api/ExtractorMessageId.js +128 -0
- package/lib-esm/api/ExtractorMessageId.js.map +1 -0
- package/lib-esm/api/IConfigFile.js +4 -0
- package/lib-esm/api/IConfigFile.js.map +1 -0
- package/lib-esm/cli/ApiExtractorCommandLine.js +51 -0
- package/lib-esm/cli/ApiExtractorCommandLine.js.map +1 -0
- package/lib-esm/cli/InitAction.js +35 -0
- package/lib-esm/cli/InitAction.js.map +1 -0
- package/lib-esm/cli/RunAction.js +123 -0
- package/lib-esm/cli/RunAction.js.map +1 -0
- package/lib-esm/collector/ApiItemMetadata.js +55 -0
- package/lib-esm/collector/ApiItemMetadata.js.map +1 -0
- package/lib-esm/collector/Collector.js +794 -0
- package/lib-esm/collector/Collector.js.map +1 -0
- package/lib-esm/collector/CollectorEntity.js +219 -0
- package/lib-esm/collector/CollectorEntity.js.map +1 -0
- package/lib-esm/collector/DeclarationMetadata.js +24 -0
- package/lib-esm/collector/DeclarationMetadata.js.map +1 -0
- package/lib-esm/collector/MessageRouter.js +476 -0
- package/lib-esm/collector/MessageRouter.js.map +1 -0
- package/lib-esm/collector/SourceMapper.js +171 -0
- package/lib-esm/collector/SourceMapper.js.map +1 -0
- package/lib-esm/collector/SymbolMetadata.js +12 -0
- package/lib-esm/collector/SymbolMetadata.js.map +1 -0
- package/lib-esm/collector/VisitorState.js +23 -0
- package/lib-esm/collector/VisitorState.js.map +1 -0
- package/lib-esm/collector/WorkingPackage.js +30 -0
- package/lib-esm/collector/WorkingPackage.js.map +1 -0
- package/lib-esm/enhancers/DocCommentEnhancer.js +213 -0
- package/lib-esm/enhancers/DocCommentEnhancer.js.map +1 -0
- package/lib-esm/enhancers/ValidationEnhancer.js +217 -0
- package/lib-esm/enhancers/ValidationEnhancer.js.map +1 -0
- package/lib-esm/generators/ApiModelGenerator.js +852 -0
- package/lib-esm/generators/ApiModelGenerator.js.map +1 -0
- package/lib-esm/generators/ApiReportGenerator.js +518 -0
- package/lib-esm/generators/ApiReportGenerator.js.map +1 -0
- package/lib-esm/generators/DeclarationReferenceGenerator.js +292 -0
- package/lib-esm/generators/DeclarationReferenceGenerator.js.map +1 -0
- package/lib-esm/generators/DtsEmitHelpers.js +227 -0
- package/lib-esm/generators/DtsEmitHelpers.js.map +1 -0
- package/lib-esm/generators/DtsRollupGenerator.js +391 -0
- package/lib-esm/generators/DtsRollupGenerator.js.map +1 -0
- package/lib-esm/generators/ExcerptBuilder.js +259 -0
- package/lib-esm/generators/ExcerptBuilder.js.map +1 -0
- package/lib-esm/generators/IndentedWriter.js +238 -0
- package/lib-esm/generators/IndentedWriter.js.map +1 -0
- package/lib-esm/index.js +17 -0
- package/lib-esm/index.js.map +1 -0
- package/lib-esm/schemas/api-extractor-defaults.json +94 -0
- package/lib-esm/schemas/api-extractor-template.json +454 -0
- package/lib-esm/schemas/api-extractor.schema.json +257 -0
- package/lib-esm/start.js +14 -0
- package/lib-esm/start.js.map +1 -0
- package/package.json +36 -10
- /package/{lib → lib-commonjs}/aedoc/PackageDocComment.js +0 -0
- /package/{lib → lib-commonjs}/aedoc/PackageDocComment.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstDeclaration.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstDeclaration.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstEntity.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstEntity.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstImport.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstImport.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstModule.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstModule.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstNamespaceExport.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstNamespaceExport.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstNamespaceImport.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstNamespaceImport.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstReferenceResolver.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstReferenceResolver.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstSymbol.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstSymbol.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstSymbolTable.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/AstSymbolTable.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/ExportAnalyzer.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/ExportAnalyzer.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/PackageMetadataManager.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/PackageMetadataManager.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/SourceFileLocationFormatter.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/SourceFileLocationFormatter.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/Span.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/Span.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/SyntaxHelpers.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/SyntaxHelpers.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/TypeScriptHelpers.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/TypeScriptHelpers.js.map +0 -0
- /package/{lib → lib-commonjs}/analyzer/TypeScriptInternals.js +0 -0
- /package/{lib → lib-commonjs}/analyzer/TypeScriptInternals.js.map +0 -0
- /package/{lib → lib-commonjs}/api/CompilerState.js +0 -0
- /package/{lib → lib-commonjs}/api/CompilerState.js.map +0 -0
- /package/{lib → lib-commonjs}/api/ConsoleMessageId.js +0 -0
- /package/{lib → lib-commonjs}/api/ConsoleMessageId.js.map +0 -0
- /package/{lib → lib-commonjs}/api/Extractor.js +0 -0
- /package/{lib → lib-commonjs}/api/Extractor.js.map +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorConfig.js +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorConfig.js.map +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorLogLevel.js +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorLogLevel.js.map +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorMessage.js +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorMessage.js.map +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorMessageId.js +0 -0
- /package/{lib → lib-commonjs}/api/ExtractorMessageId.js.map +0 -0
- /package/{lib → lib-commonjs}/api/IConfigFile.js +0 -0
- /package/{lib → lib-commonjs}/api/IConfigFile.js.map +0 -0
- /package/{lib → lib-commonjs}/cli/ApiExtractorCommandLine.js +0 -0
- /package/{lib → lib-commonjs}/cli/ApiExtractorCommandLine.js.map +0 -0
- /package/{lib → lib-commonjs}/cli/InitAction.js +0 -0
- /package/{lib → lib-commonjs}/cli/InitAction.js.map +0 -0
- /package/{lib → lib-commonjs}/cli/RunAction.js +0 -0
- /package/{lib → lib-commonjs}/cli/RunAction.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/ApiItemMetadata.js +0 -0
- /package/{lib → lib-commonjs}/collector/ApiItemMetadata.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/Collector.js +0 -0
- /package/{lib → lib-commonjs}/collector/Collector.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/CollectorEntity.js +0 -0
- /package/{lib → lib-commonjs}/collector/CollectorEntity.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/DeclarationMetadata.js +0 -0
- /package/{lib → lib-commonjs}/collector/DeclarationMetadata.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/MessageRouter.js +0 -0
- /package/{lib → lib-commonjs}/collector/MessageRouter.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/SourceMapper.js +0 -0
- /package/{lib → lib-commonjs}/collector/SourceMapper.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/SymbolMetadata.js +0 -0
- /package/{lib → lib-commonjs}/collector/SymbolMetadata.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/VisitorState.js +0 -0
- /package/{lib → lib-commonjs}/collector/VisitorState.js.map +0 -0
- /package/{lib → lib-commonjs}/collector/WorkingPackage.js +0 -0
- /package/{lib → lib-commonjs}/collector/WorkingPackage.js.map +0 -0
- /package/{lib → lib-commonjs}/enhancers/DocCommentEnhancer.js +0 -0
- /package/{lib → lib-commonjs}/enhancers/DocCommentEnhancer.js.map +0 -0
- /package/{lib → lib-commonjs}/enhancers/ValidationEnhancer.js +0 -0
- /package/{lib → lib-commonjs}/enhancers/ValidationEnhancer.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/ApiModelGenerator.js +0 -0
- /package/{lib → lib-commonjs}/generators/ApiModelGenerator.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/ApiReportGenerator.js +0 -0
- /package/{lib → lib-commonjs}/generators/ApiReportGenerator.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/DeclarationReferenceGenerator.js +0 -0
- /package/{lib → lib-commonjs}/generators/DeclarationReferenceGenerator.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/DtsEmitHelpers.js +0 -0
- /package/{lib → lib-commonjs}/generators/DtsEmitHelpers.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/DtsRollupGenerator.js +0 -0
- /package/{lib → lib-commonjs}/generators/DtsRollupGenerator.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/ExcerptBuilder.js +0 -0
- /package/{lib → lib-commonjs}/generators/ExcerptBuilder.js.map +0 -0
- /package/{lib → lib-commonjs}/generators/IndentedWriter.js +0 -0
- /package/{lib → lib-commonjs}/generators/IndentedWriter.js.map +0 -0
- /package/{lib → lib-commonjs}/index.js +0 -0
- /package/{lib → lib-commonjs}/index.js.map +0 -0
- /package/{lib → lib-commonjs}/schemas/api-extractor-defaults.json +0 -0
- /package/{lib → lib-commonjs}/schemas/api-extractor-template.json +0 -0
- /package/{lib → lib-commonjs}/schemas/api-extractor.schema.json +0 -0
- /package/{lib → lib-commonjs}/start.js +0 -0
- /package/{lib → lib-commonjs}/start.js.map +0 -0
- /package/{lib → lib-dts}/aedoc/PackageDocComment.d.ts +0 -0
- /package/{lib → lib-dts}/aedoc/PackageDocComment.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstDeclaration.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstDeclaration.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstEntity.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstEntity.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstImport.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstImport.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstModule.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstModule.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstNamespaceExport.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstNamespaceExport.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstNamespaceImport.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstNamespaceImport.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstReferenceResolver.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstReferenceResolver.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstSymbol.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstSymbol.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/AstSymbolTable.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/AstSymbolTable.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/ExportAnalyzer.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/ExportAnalyzer.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/PackageMetadataManager.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/PackageMetadataManager.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/SourceFileLocationFormatter.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/SourceFileLocationFormatter.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/Span.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/Span.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/SyntaxHelpers.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/SyntaxHelpers.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/TypeScriptHelpers.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/TypeScriptHelpers.d.ts.map +0 -0
- /package/{lib → lib-dts}/analyzer/TypeScriptInternals.d.ts +0 -0
- /package/{lib → lib-dts}/analyzer/TypeScriptInternals.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/CompilerState.d.ts +0 -0
- /package/{lib → lib-dts}/api/CompilerState.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/ConsoleMessageId.d.ts +0 -0
- /package/{lib → lib-dts}/api/ConsoleMessageId.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/Extractor.d.ts +0 -0
- /package/{lib → lib-dts}/api/Extractor.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/ExtractorConfig.d.ts +0 -0
- /package/{lib → lib-dts}/api/ExtractorConfig.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/ExtractorLogLevel.d.ts +0 -0
- /package/{lib → lib-dts}/api/ExtractorLogLevel.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/ExtractorMessage.d.ts +0 -0
- /package/{lib → lib-dts}/api/ExtractorMessage.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/ExtractorMessageId.d.ts +0 -0
- /package/{lib → lib-dts}/api/ExtractorMessageId.d.ts.map +0 -0
- /package/{lib → lib-dts}/api/IConfigFile.d.ts +0 -0
- /package/{lib → lib-dts}/api/IConfigFile.d.ts.map +0 -0
- /package/{lib → lib-dts}/cli/ApiExtractorCommandLine.d.ts +0 -0
- /package/{lib → lib-dts}/cli/ApiExtractorCommandLine.d.ts.map +0 -0
- /package/{lib → lib-dts}/cli/InitAction.d.ts +0 -0
- /package/{lib → lib-dts}/cli/InitAction.d.ts.map +0 -0
- /package/{lib → lib-dts}/cli/RunAction.d.ts +0 -0
- /package/{lib → lib-dts}/cli/RunAction.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/ApiItemMetadata.d.ts +0 -0
- /package/{lib → lib-dts}/collector/ApiItemMetadata.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/Collector.d.ts +0 -0
- /package/{lib → lib-dts}/collector/Collector.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/CollectorEntity.d.ts +0 -0
- /package/{lib → lib-dts}/collector/CollectorEntity.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/DeclarationMetadata.d.ts +0 -0
- /package/{lib → lib-dts}/collector/DeclarationMetadata.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/MessageRouter.d.ts +0 -0
- /package/{lib → lib-dts}/collector/MessageRouter.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/SourceMapper.d.ts +0 -0
- /package/{lib → lib-dts}/collector/SourceMapper.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/SymbolMetadata.d.ts +0 -0
- /package/{lib → lib-dts}/collector/SymbolMetadata.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/VisitorState.d.ts +0 -0
- /package/{lib → lib-dts}/collector/VisitorState.d.ts.map +0 -0
- /package/{lib → lib-dts}/collector/WorkingPackage.d.ts +0 -0
- /package/{lib → lib-dts}/collector/WorkingPackage.d.ts.map +0 -0
- /package/{lib → lib-dts}/enhancers/DocCommentEnhancer.d.ts +0 -0
- /package/{lib → lib-dts}/enhancers/DocCommentEnhancer.d.ts.map +0 -0
- /package/{lib → lib-dts}/enhancers/ValidationEnhancer.d.ts +0 -0
- /package/{lib → lib-dts}/enhancers/ValidationEnhancer.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/ApiModelGenerator.d.ts +0 -0
- /package/{lib → lib-dts}/generators/ApiModelGenerator.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/ApiReportGenerator.d.ts +0 -0
- /package/{lib → lib-dts}/generators/ApiReportGenerator.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/DeclarationReferenceGenerator.d.ts +0 -0
- /package/{lib → lib-dts}/generators/DeclarationReferenceGenerator.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/DtsEmitHelpers.d.ts +0 -0
- /package/{lib → lib-dts}/generators/DtsEmitHelpers.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/DtsRollupGenerator.d.ts +0 -0
- /package/{lib → lib-dts}/generators/DtsRollupGenerator.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/ExcerptBuilder.d.ts +0 -0
- /package/{lib → lib-dts}/generators/ExcerptBuilder.d.ts.map +0 -0
- /package/{lib → lib-dts}/generators/IndentedWriter.d.ts +0 -0
- /package/{lib → lib-dts}/generators/IndentedWriter.d.ts.map +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts.map +0 -0
- /package/{lib → lib-dts}/start.d.ts +0 -0
- /package/{lib → lib-dts}/start.d.ts.map +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import { CommandLineParser } from '@rushstack/ts-command-line';
|
|
5
|
+
import { AlreadyReportedError, InternalError } from '@rushstack/node-core-library';
|
|
6
|
+
import { Colorize } from '@rushstack/terminal';
|
|
7
|
+
import { RunAction } from './RunAction';
|
|
8
|
+
import { InitAction } from './InitAction';
|
|
9
|
+
export class ApiExtractorCommandLine extends CommandLineParser {
|
|
10
|
+
constructor() {
|
|
11
|
+
super({
|
|
12
|
+
toolFilename: 'api-extractor',
|
|
13
|
+
toolDescription: 'API Extractor helps you build better TypeScript libraries. It analyzes the main entry' +
|
|
14
|
+
' point for your package, collects the inventory of exported declarations, and then generates three kinds' +
|
|
15
|
+
' of output: an API report file (.api.md) to facilitate reviews, a declaration rollup (.d.ts) to be' +
|
|
16
|
+
' published with your NPM package, and a doc model file (.api.json) to be used with a documentation' +
|
|
17
|
+
' tool such as api-documenter. For details, please visit the web site.'
|
|
18
|
+
});
|
|
19
|
+
this._populateActions();
|
|
20
|
+
this._debugParameter = this.defineFlagParameter({
|
|
21
|
+
parameterLongName: '--debug',
|
|
22
|
+
parameterShortName: '-d',
|
|
23
|
+
description: 'Show the full call stack if an error occurs while executing the tool'
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async onExecuteAsync() {
|
|
27
|
+
if (this._debugParameter.value) {
|
|
28
|
+
InternalError.breakInDebugger = true;
|
|
29
|
+
}
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
try {
|
|
32
|
+
await super.onExecuteAsync();
|
|
33
|
+
process.exitCode = 0;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (!(error instanceof AlreadyReportedError)) {
|
|
37
|
+
if (this._debugParameter.value) {
|
|
38
|
+
console.error(os.EOL + error.stack);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.error(os.EOL + Colorize.red('ERROR: ' + error.message.trim()));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
_populateActions() {
|
|
47
|
+
this.addAction(new InitAction(this));
|
|
48
|
+
this.addAction(new RunAction(this));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=ApiExtractorCommandLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiExtractorCommandLine.js","sourceRoot":"","sources":["../../src/cli/ApiExtractorCommandLine.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAiC,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,OAAO,uBAAwB,SAAQ,iBAAiB;IAG5D;QACE,KAAK,CAAC;YACJ,YAAY,EAAE,eAAe;YAC7B,eAAe,EACb,wFAAwF;gBACxF,0GAA0G;gBAC1G,qGAAqG;gBACrG,oGAAoG;gBACpG,wEAAwE;SAC3E,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAExB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAC9C,iBAAiB,EAAE,SAAS;YAC5B,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,sEAAsE;SACpF,CAAC,CAAC;IACL,CAAC;IAEkB,KAAK,CAAC,cAAc;QACrC,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;YAC/B,aAAa,CAAC,eAAe,GAAG,IAAI,CAAC;QACvC,CAAC;QAED,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC;YACH,MAAM,KAAK,CAAC,cAAc,EAAE,CAAC;YAC7B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,oBAAoB,CAAC,EAAE,CAAC;gBAC7C,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;oBAC/B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;gBACtC,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as os from 'node:os';\n\nimport { CommandLineParser, type CommandLineFlagParameter } from '@rushstack/ts-command-line';\nimport { AlreadyReportedError, InternalError } from '@rushstack/node-core-library';\nimport { Colorize } from '@rushstack/terminal';\n\nimport { RunAction } from './RunAction';\nimport { InitAction } from './InitAction';\n\nexport class ApiExtractorCommandLine extends CommandLineParser {\n private readonly _debugParameter: CommandLineFlagParameter;\n\n public constructor() {\n super({\n toolFilename: 'api-extractor',\n toolDescription:\n 'API Extractor helps you build better TypeScript libraries. It analyzes the main entry' +\n ' point for your package, collects the inventory of exported declarations, and then generates three kinds' +\n ' of output: an API report file (.api.md) to facilitate reviews, a declaration rollup (.d.ts) to be' +\n ' published with your NPM package, and a doc model file (.api.json) to be used with a documentation' +\n ' tool such as api-documenter. For details, please visit the web site.'\n });\n this._populateActions();\n\n this._debugParameter = this.defineFlagParameter({\n parameterLongName: '--debug',\n parameterShortName: '-d',\n description: 'Show the full call stack if an error occurs while executing the tool'\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n if (this._debugParameter.value) {\n InternalError.breakInDebugger = true;\n }\n\n process.exitCode = 1;\n try {\n await super.onExecuteAsync();\n process.exitCode = 0;\n } catch (error) {\n if (!(error instanceof AlreadyReportedError)) {\n if (this._debugParameter.value) {\n console.error(os.EOL + error.stack);\n } else {\n console.error(os.EOL + Colorize.red('ERROR: ' + error.message.trim()));\n }\n }\n }\n }\n\n private _populateActions(): void {\n this.addAction(new InitAction(this));\n this.addAction(new RunAction(this));\n }\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import { FileSystem } from '@rushstack/node-core-library';
|
|
5
|
+
import { CommandLineAction } from '@rushstack/ts-command-line';
|
|
6
|
+
import { Colorize } from '@rushstack/terminal';
|
|
7
|
+
import { ExtractorConfig } from '../api/ExtractorConfig';
|
|
8
|
+
export class InitAction extends CommandLineAction {
|
|
9
|
+
constructor(parser) {
|
|
10
|
+
super({
|
|
11
|
+
actionName: 'init',
|
|
12
|
+
summary: `Create an ${ExtractorConfig.FILENAME} config file`,
|
|
13
|
+
documentation: `Use this command when setting up API Extractor for a new project. It writes an` +
|
|
14
|
+
` ${ExtractorConfig.FILENAME} config file template with code comments that describe all the settings.` +
|
|
15
|
+
` The file will be written in the current directory.`
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async onExecuteAsync() {
|
|
19
|
+
const inputFilePath = path.resolve(__dirname, '../schemas/api-extractor-template.json');
|
|
20
|
+
const outputFilePath = path.resolve(ExtractorConfig.FILENAME);
|
|
21
|
+
if (FileSystem.exists(outputFilePath)) {
|
|
22
|
+
console.log(Colorize.red('The output file already exists:'));
|
|
23
|
+
console.log('\n ' + outputFilePath + '\n');
|
|
24
|
+
throw new Error('Unable to write output file');
|
|
25
|
+
}
|
|
26
|
+
console.log(Colorize.green('Writing file: ') + outputFilePath);
|
|
27
|
+
FileSystem.copyFile({
|
|
28
|
+
sourcePath: inputFilePath,
|
|
29
|
+
destinationPath: outputFilePath
|
|
30
|
+
});
|
|
31
|
+
console.log('\nThe recommended location for this file is in the project\'s "config" subfolder,\n' +
|
|
32
|
+
'or else in the top-level folder with package.json.');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=InitAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitAction.js","sourceRoot":"","sources":["../../src/cli/InitAction.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAC/C,YAAmB,MAA+B;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,MAAM;YAClB,OAAO,EAAE,aAAa,eAAe,CAAC,QAAQ,cAAc;YAC5D,aAAa,EACX,iFAAiF;gBACjF,IAAI,eAAe,CAAC,QAAQ,0EAA0E;gBACtG,qDAAqD;SACxD,CAAC,CAAC;IACL,CAAC;IAEkB,KAAK,CAAC,cAAc;QACrC,MAAM,aAAa,GAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,wCAAwC,CAAC,CAAC;QAChG,MAAM,cAAc,GAAW,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAEtE,IAAI,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAC,CAAC;QAC/D,UAAU,CAAC,QAAQ,CAAC;YAClB,UAAU,EAAE,aAAa;YACzB,eAAe,EAAE,cAAc;SAChC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACT,qFAAqF;YACnF,oDAAoD,CACvD,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'node:path';\n\nimport { FileSystem } from '@rushstack/node-core-library';\nimport { CommandLineAction } from '@rushstack/ts-command-line';\nimport { Colorize } from '@rushstack/terminal';\n\nimport type { ApiExtractorCommandLine } from './ApiExtractorCommandLine';\nimport { ExtractorConfig } from '../api/ExtractorConfig';\n\nexport class InitAction extends CommandLineAction {\n public constructor(parser: ApiExtractorCommandLine) {\n super({\n actionName: 'init',\n summary: `Create an ${ExtractorConfig.FILENAME} config file`,\n documentation:\n `Use this command when setting up API Extractor for a new project. It writes an` +\n ` ${ExtractorConfig.FILENAME} config file template with code comments that describe all the settings.` +\n ` The file will be written in the current directory.`\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n const inputFilePath: string = path.resolve(__dirname, '../schemas/api-extractor-template.json');\n const outputFilePath: string = path.resolve(ExtractorConfig.FILENAME);\n\n if (FileSystem.exists(outputFilePath)) {\n console.log(Colorize.red('The output file already exists:'));\n console.log('\\n ' + outputFilePath + '\\n');\n throw new Error('Unable to write output file');\n }\n\n console.log(Colorize.green('Writing file: ') + outputFilePath);\n FileSystem.copyFile({\n sourcePath: inputFilePath,\n destinationPath: outputFilePath\n });\n\n console.log(\n '\\nThe recommended location for this file is in the project\\'s \"config\" subfolder,\\n' +\n 'or else in the top-level folder with package.json.'\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { PackageJsonLookup, FileSystem, Path, AlreadyReportedError } from '@rushstack/node-core-library';
|
|
6
|
+
import { Colorize } from '@rushstack/terminal';
|
|
7
|
+
import { CommandLineAction } from '@rushstack/ts-command-line';
|
|
8
|
+
import { Extractor } from '../api/Extractor';
|
|
9
|
+
import { ExtractorConfig } from '../api/ExtractorConfig';
|
|
10
|
+
export class RunAction extends CommandLineAction {
|
|
11
|
+
constructor(parser) {
|
|
12
|
+
super({
|
|
13
|
+
actionName: 'run',
|
|
14
|
+
summary: 'Invoke API Extractor on a project',
|
|
15
|
+
documentation: 'Invoke API Extractor on a project'
|
|
16
|
+
});
|
|
17
|
+
this._configFileParameter = this.defineStringParameter({
|
|
18
|
+
parameterLongName: '--config',
|
|
19
|
+
parameterShortName: '-c',
|
|
20
|
+
argumentName: 'FILE',
|
|
21
|
+
description: `Use the specified ${ExtractorConfig.FILENAME} file path, rather than guessing its location`
|
|
22
|
+
});
|
|
23
|
+
this._localFlag = this.defineFlagParameter({
|
|
24
|
+
parameterLongName: '--local',
|
|
25
|
+
parameterShortName: '-l',
|
|
26
|
+
description: 'Indicates that API Extractor is running as part of a local build,' +
|
|
27
|
+
" e.g. on a developer's machine. This disables certain validation that would" +
|
|
28
|
+
' normally be performed for a ship/production build. For example, the *.api.md' +
|
|
29
|
+
' report file is automatically copied in a local build.'
|
|
30
|
+
});
|
|
31
|
+
this._verboseFlag = this.defineFlagParameter({
|
|
32
|
+
parameterLongName: '--verbose',
|
|
33
|
+
parameterShortName: '-v',
|
|
34
|
+
description: 'Show additional informational messages in the output.'
|
|
35
|
+
});
|
|
36
|
+
this._diagnosticsParameter = this.defineFlagParameter({
|
|
37
|
+
parameterLongName: '--diagnostics',
|
|
38
|
+
description: 'Show diagnostic messages used for troubleshooting problems with API Extractor.' +
|
|
39
|
+
' This flag also enables the "--verbose" flag.'
|
|
40
|
+
});
|
|
41
|
+
this._typescriptCompilerFolderParameter = this.defineStringParameter({
|
|
42
|
+
parameterLongName: '--typescript-compiler-folder',
|
|
43
|
+
argumentName: 'PATH',
|
|
44
|
+
description: 'API Extractor uses its own TypeScript compiler engine to analyze your project. If your project' +
|
|
45
|
+
' is built with a significantly different TypeScript version, sometimes API Extractor may report compilation' +
|
|
46
|
+
' errors due to differences in the system typings (e.g. lib.dom.d.ts). You can use the' +
|
|
47
|
+
' "--typescriptCompilerFolder" option to specify the folder path where you installed the TypeScript package,' +
|
|
48
|
+
" and API Extractor's compiler will use those system typings instead."
|
|
49
|
+
});
|
|
50
|
+
this._printApiReportDiffFlag = this.defineFlagParameter({
|
|
51
|
+
parameterLongName: '--print-api-report-diff',
|
|
52
|
+
description: 'If provided, then any differences between the actual and expected API reports will be ' +
|
|
53
|
+
'printed on the console. Note that the diff is not printed if the expected API report file has not been ' +
|
|
54
|
+
'created yet.'
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async onExecuteAsync() {
|
|
58
|
+
const lookup = new PackageJsonLookup();
|
|
59
|
+
let configFilename;
|
|
60
|
+
let typescriptCompilerFolder = this._typescriptCompilerFolderParameter.value;
|
|
61
|
+
if (typescriptCompilerFolder) {
|
|
62
|
+
typescriptCompilerFolder = path.normalize(typescriptCompilerFolder);
|
|
63
|
+
if (FileSystem.exists(typescriptCompilerFolder)) {
|
|
64
|
+
typescriptCompilerFolder = lookup.tryGetPackageFolderFor(typescriptCompilerFolder);
|
|
65
|
+
const typescriptCompilerPackageJson = typescriptCompilerFolder
|
|
66
|
+
? lookup.tryLoadPackageJsonFor(typescriptCompilerFolder)
|
|
67
|
+
: undefined;
|
|
68
|
+
if (!typescriptCompilerPackageJson) {
|
|
69
|
+
throw new Error(`The path specified in the ${this._typescriptCompilerFolderParameter.longName} parameter is not a package.`);
|
|
70
|
+
}
|
|
71
|
+
else if (typescriptCompilerPackageJson.name !== 'typescript') {
|
|
72
|
+
throw new Error(`The path specified in the ${this._typescriptCompilerFolderParameter.longName} parameter is not a TypeScript` +
|
|
73
|
+
' compiler package.');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error(`The path specified in the ${this._typescriptCompilerFolderParameter.longName} parameter does not exist.`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
let extractorConfig;
|
|
81
|
+
if (this._configFileParameter.value) {
|
|
82
|
+
configFilename = path.normalize(this._configFileParameter.value);
|
|
83
|
+
if (!FileSystem.exists(configFilename)) {
|
|
84
|
+
throw new Error('Config file not found: ' + this._configFileParameter.value);
|
|
85
|
+
}
|
|
86
|
+
extractorConfig = ExtractorConfig.loadFileAndPrepare(configFilename);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const prepareOptions = ExtractorConfig.tryLoadForFolder({
|
|
90
|
+
startingFolder: '.'
|
|
91
|
+
});
|
|
92
|
+
if (!prepareOptions || !prepareOptions.configObjectFullPath) {
|
|
93
|
+
throw new Error(`Unable to find an ${ExtractorConfig.FILENAME} file`);
|
|
94
|
+
}
|
|
95
|
+
const configObjectShortPath = Path.formatConcisely({
|
|
96
|
+
pathToConvert: prepareOptions.configObjectFullPath,
|
|
97
|
+
baseFolder: process.cwd()
|
|
98
|
+
});
|
|
99
|
+
console.log(`Using configuration from ${configObjectShortPath}`);
|
|
100
|
+
extractorConfig = ExtractorConfig.prepare(prepareOptions);
|
|
101
|
+
}
|
|
102
|
+
const extractorResult = Extractor.invoke(extractorConfig, {
|
|
103
|
+
localBuild: this._localFlag.value,
|
|
104
|
+
showVerboseMessages: this._verboseFlag.value,
|
|
105
|
+
showDiagnostics: this._diagnosticsParameter.value,
|
|
106
|
+
typescriptCompilerFolder: typescriptCompilerFolder,
|
|
107
|
+
printApiReportDiff: this._printApiReportDiffFlag.value
|
|
108
|
+
});
|
|
109
|
+
if (extractorResult.succeeded) {
|
|
110
|
+
console.log(os.EOL + 'API Extractor completed successfully');
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
if (extractorResult.errorCount > 0) {
|
|
114
|
+
console.log(os.EOL + Colorize.red('API Extractor completed with errors'));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
console.log(os.EOL + Colorize.yellow('API Extractor completed with warnings'));
|
|
118
|
+
}
|
|
119
|
+
throw new AlreadyReportedError();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=RunAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunAction.js","sourceRoot":"","sources":["../../src/cli/RunAction.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,iBAAiB,EACjB,UAAU,EAEV,IAAI,EACJ,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAA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,uBAAuB,CAAC,KAAK;SACvD,CAAC,CAAC;QAEH,IAAI,eAAe,CAAC,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,sCAAsC,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,IAAI,eAAe,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC,CAAC;YAC5E,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC;YACjF,CAAC;YACD,MAAM,IAAI,oBAAoB,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as os from 'node:os';\nimport * as path from 'node:path';\n\nimport {\n PackageJsonLookup,\n FileSystem,\n type IPackageJson,\n Path,\n AlreadyReportedError\n} from '@rushstack/node-core-library';\nimport { Colorize } from '@rushstack/terminal';\nimport {\n CommandLineAction,\n type CommandLineStringParameter,\n type CommandLineFlagParameter\n} from '@rushstack/ts-command-line';\n\nimport { Extractor, type ExtractorResult } from '../api/Extractor';\nimport type { ApiExtractorCommandLine } from './ApiExtractorCommandLine';\nimport { ExtractorConfig, type IExtractorConfigPrepareOptions } from '../api/ExtractorConfig';\n\nexport class RunAction extends CommandLineAction {\n private readonly _configFileParameter: CommandLineStringParameter;\n private readonly _localFlag: CommandLineFlagParameter;\n private readonly _verboseFlag: CommandLineFlagParameter;\n private readonly _diagnosticsParameter: CommandLineFlagParameter;\n private readonly _typescriptCompilerFolderParameter: CommandLineStringParameter;\n private readonly _printApiReportDiffFlag: CommandLineFlagParameter;\n\n public constructor(parser: ApiExtractorCommandLine) {\n super({\n actionName: 'run',\n summary: 'Invoke API Extractor on a project',\n documentation: 'Invoke API Extractor on a project'\n });\n\n this._configFileParameter = this.defineStringParameter({\n parameterLongName: '--config',\n parameterShortName: '-c',\n argumentName: 'FILE',\n description: `Use the specified ${ExtractorConfig.FILENAME} file path, rather than guessing its location`\n });\n\n this._localFlag = this.defineFlagParameter({\n parameterLongName: '--local',\n parameterShortName: '-l',\n description:\n 'Indicates that API Extractor is running as part of a local build,' +\n \" e.g. on a developer's machine. This disables certain validation that would\" +\n ' normally be performed for a ship/production build. For example, the *.api.md' +\n ' report file is automatically copied in a local build.'\n });\n\n this._verboseFlag = this.defineFlagParameter({\n parameterLongName: '--verbose',\n parameterShortName: '-v',\n description: 'Show additional informational messages in the output.'\n });\n\n this._diagnosticsParameter = this.defineFlagParameter({\n parameterLongName: '--diagnostics',\n description:\n 'Show diagnostic messages used for troubleshooting problems with API Extractor.' +\n ' This flag also enables the \"--verbose\" flag.'\n });\n\n this._typescriptCompilerFolderParameter = this.defineStringParameter({\n parameterLongName: '--typescript-compiler-folder',\n argumentName: 'PATH',\n description:\n 'API Extractor uses its own TypeScript compiler engine to analyze your project. If your project' +\n ' is built with a significantly different TypeScript version, sometimes API Extractor may report compilation' +\n ' errors due to differences in the system typings (e.g. lib.dom.d.ts). You can use the' +\n ' \"--typescriptCompilerFolder\" option to specify the folder path where you installed the TypeScript package,' +\n \" and API Extractor's compiler will use those system typings instead.\"\n });\n\n this._printApiReportDiffFlag = this.defineFlagParameter({\n parameterLongName: '--print-api-report-diff',\n description:\n 'If provided, then any differences between the actual and expected API reports will be ' +\n 'printed on the console. Note that the diff is not printed if the expected API report file has not been ' +\n 'created yet.'\n });\n }\n\n protected override async onExecuteAsync(): Promise<void> {\n const lookup: PackageJsonLookup = new PackageJsonLookup();\n let configFilename: string;\n\n let typescriptCompilerFolder: string | undefined = this._typescriptCompilerFolderParameter.value;\n if (typescriptCompilerFolder) {\n typescriptCompilerFolder = path.normalize(typescriptCompilerFolder);\n\n if (FileSystem.exists(typescriptCompilerFolder)) {\n typescriptCompilerFolder = lookup.tryGetPackageFolderFor(typescriptCompilerFolder);\n const typescriptCompilerPackageJson: IPackageJson | undefined = typescriptCompilerFolder\n ? lookup.tryLoadPackageJsonFor(typescriptCompilerFolder)\n : undefined;\n if (!typescriptCompilerPackageJson) {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolderParameter.longName} parameter is not a package.`\n );\n } else if (typescriptCompilerPackageJson.name !== 'typescript') {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolderParameter.longName} parameter is not a TypeScript` +\n ' compiler package.'\n );\n }\n } else {\n throw new Error(\n `The path specified in the ${this._typescriptCompilerFolderParameter.longName} parameter does not exist.`\n );\n }\n }\n\n let extractorConfig: ExtractorConfig;\n\n if (this._configFileParameter.value) {\n configFilename = path.normalize(this._configFileParameter.value);\n if (!FileSystem.exists(configFilename)) {\n throw new Error('Config file not found: ' + this._configFileParameter.value);\n }\n\n extractorConfig = ExtractorConfig.loadFileAndPrepare(configFilename);\n } else {\n const prepareOptions: IExtractorConfigPrepareOptions | undefined = ExtractorConfig.tryLoadForFolder({\n startingFolder: '.'\n });\n\n if (!prepareOptions || !prepareOptions.configObjectFullPath) {\n throw new Error(`Unable to find an ${ExtractorConfig.FILENAME} file`);\n }\n\n const configObjectShortPath: string = Path.formatConcisely({\n pathToConvert: prepareOptions.configObjectFullPath,\n baseFolder: process.cwd()\n });\n console.log(`Using configuration from ${configObjectShortPath}`);\n\n extractorConfig = ExtractorConfig.prepare(prepareOptions);\n }\n\n const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, {\n localBuild: this._localFlag.value,\n showVerboseMessages: this._verboseFlag.value,\n showDiagnostics: this._diagnosticsParameter.value,\n typescriptCompilerFolder: typescriptCompilerFolder,\n printApiReportDiff: this._printApiReportDiffFlag.value\n });\n\n if (extractorResult.succeeded) {\n console.log(os.EOL + 'API Extractor completed successfully');\n } else {\n if (extractorResult.errorCount > 0) {\n console.log(os.EOL + Colorize.red('API Extractor completed with errors'));\n } else {\n console.log(os.EOL + Colorize.yellow('API Extractor completed with warnings'));\n }\n throw new AlreadyReportedError();\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
import { VisitorState } from './VisitorState';
|
|
4
|
+
/**
|
|
5
|
+
* Stores the Collector's additional analysis for an `AstDeclaration`. This object is assigned to
|
|
6
|
+
* `AstDeclaration.apiItemMetadata` but consumers must always obtain it by calling `Collector.fetchApiItemMetadata()`.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Note that ancillary declarations share their `ApiItemMetadata` with the main declaration,
|
|
10
|
+
* whereas a separate `DeclarationMetadata` object is created for each declaration.
|
|
11
|
+
*
|
|
12
|
+
* Consider this example:
|
|
13
|
+
* ```ts
|
|
14
|
+
* export declare class A {
|
|
15
|
+
* get b(): string;
|
|
16
|
+
* set b(value: string);
|
|
17
|
+
* }
|
|
18
|
+
* export declare namespace A { }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* In this example, there are two "symbols": `A` and `b`
|
|
22
|
+
*
|
|
23
|
+
* There are four "declarations": `A` class, `A` namespace, `b` getter, `b` setter
|
|
24
|
+
*
|
|
25
|
+
* There are three "API items": `A` class, `A` namespace, `b` property. The property getter is the main declaration
|
|
26
|
+
* for `b`, and the setter is the "ancillary" declaration.
|
|
27
|
+
*/
|
|
28
|
+
export class ApiItemMetadata {
|
|
29
|
+
constructor(options) {
|
|
30
|
+
/**
|
|
31
|
+
* Tracks whether or not the associated API item is known to be missing sufficient documentation.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
*
|
|
35
|
+
* An "undocumented" item is one whose TSDoc comment which either does not contain a summary comment block, or
|
|
36
|
+
* has an `@inheritDoc` tag that resolves to another "undocumented" API member.
|
|
37
|
+
*
|
|
38
|
+
* If there is any ambiguity (e.g. if an `@inheritDoc` comment points to an external API member, whose documentation,
|
|
39
|
+
* we can't parse), "undocumented" will be `false`.
|
|
40
|
+
*
|
|
41
|
+
* @remarks Assigned by {@link DocCommentEnhancer}.
|
|
42
|
+
*/
|
|
43
|
+
this.undocumented = true;
|
|
44
|
+
this.docCommentEnhancerVisitorState = VisitorState.Unvisited;
|
|
45
|
+
this.declaredReleaseTag = options.declaredReleaseTag;
|
|
46
|
+
this.effectiveReleaseTag = options.effectiveReleaseTag;
|
|
47
|
+
this.releaseTagSameAsParent = options.releaseTagSameAsParent;
|
|
48
|
+
this.isEventProperty = options.isEventProperty;
|
|
49
|
+
this.isOverride = options.isOverride;
|
|
50
|
+
this.isSealed = options.isSealed;
|
|
51
|
+
this.isVirtual = options.isVirtual;
|
|
52
|
+
this.isPreapproved = options.isPreapproved;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=ApiItemMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiItemMetadata.js","sourceRoot":"","sources":["../../src/collector/ApiItemMetadata.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAK3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAgB9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,eAAe;IAiD1B,YAAmB,OAAgC;QAjBnD;;;;;;;;;;;;WAYG;QACI,iBAAY,GAAY,IAAI,CAAC;QAE7B,mCAA8B,GAAiB,YAAY,CAAC,SAAS,CAAC;QAG3E,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;QACvD,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;QAC7D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type * as tsdoc from '@microsoft/tsdoc';\nimport type { ReleaseTag } from '@microsoft/api-extractor-model';\n\nimport { VisitorState } from './VisitorState';\n\n/**\n * Constructor parameters for `ApiItemMetadata`.\n */\nexport interface IApiItemMetadataOptions {\n declaredReleaseTag: ReleaseTag;\n effectiveReleaseTag: ReleaseTag;\n releaseTagSameAsParent: boolean;\n isEventProperty: boolean;\n isOverride: boolean;\n isSealed: boolean;\n isVirtual: boolean;\n isPreapproved: boolean;\n}\n\n/**\n * Stores the Collector's additional analysis for an `AstDeclaration`. This object is assigned to\n * `AstDeclaration.apiItemMetadata` but consumers must always obtain it by calling `Collector.fetchApiItemMetadata()`.\n *\n * @remarks\n * Note that ancillary declarations share their `ApiItemMetadata` with the main declaration,\n * whereas a separate `DeclarationMetadata` object is created for each declaration.\n *\n * Consider this example:\n * ```ts\n * export declare class A {\n * get b(): string;\n * set b(value: string);\n * }\n * export declare namespace A { }\n * ```\n *\n * In this example, there are two \"symbols\": `A` and `b`\n *\n * There are four \"declarations\": `A` class, `A` namespace, `b` getter, `b` setter\n *\n * There are three \"API items\": `A` class, `A` namespace, `b` property. The property getter is the main declaration\n * for `b`, and the setter is the \"ancillary\" declaration.\n */\nexport class ApiItemMetadata {\n /**\n * This is the release tag that was explicitly specified in the original doc comment, if any.\n */\n public readonly declaredReleaseTag: ReleaseTag;\n\n /**\n * The \"effective\" release tag is a normalized value that is based on `declaredReleaseTag`,\n * but may be inherited from a parent, or corrected if the declared value was somehow invalid.\n * When actually trimming .d.ts files or generating docs, API Extractor uses the \"effective\" value\n * instead of the \"declared\" value.\n */\n public readonly effectiveReleaseTag: ReleaseTag;\n\n // If true, then it would be redundant to show this release tag\n public readonly releaseTagSameAsParent: boolean;\n\n // NOTE: In the future, the Collector may infer or error-correct some of these states.\n // Generators should rely on these instead of tsdocComment.modifierTagSet.\n public readonly isEventProperty: boolean;\n public readonly isOverride: boolean;\n public readonly isSealed: boolean;\n public readonly isVirtual: boolean;\n\n public readonly isPreapproved: boolean;\n\n /**\n * This is the TSDoc comment for the declaration. It may be modified (or constructed artificially) by\n * the DocCommentEnhancer.\n */\n public tsdocComment: tsdoc.DocComment | undefined;\n\n /**\n * Tracks whether or not the associated API item is known to be missing sufficient documentation.\n *\n * @remarks\n *\n * An \"undocumented\" item is one whose TSDoc comment which either does not contain a summary comment block, or\n * has an `@inheritDoc` tag that resolves to another \"undocumented\" API member.\n *\n * If there is any ambiguity (e.g. if an `@inheritDoc` comment points to an external API member, whose documentation,\n * we can't parse), \"undocumented\" will be `false`.\n *\n * @remarks Assigned by {@link DocCommentEnhancer}.\n */\n public undocumented: boolean = true;\n\n public docCommentEnhancerVisitorState: VisitorState = VisitorState.Unvisited;\n\n public constructor(options: IApiItemMetadataOptions) {\n this.declaredReleaseTag = options.declaredReleaseTag;\n this.effectiveReleaseTag = options.effectiveReleaseTag;\n this.releaseTagSameAsParent = options.releaseTagSameAsParent;\n this.isEventProperty = options.isEventProperty;\n this.isOverride = options.isOverride;\n this.isSealed = options.isSealed;\n this.isVirtual = options.isVirtual;\n this.isPreapproved = options.isPreapproved;\n }\n}\n"]}
|