feat(api-extractor): support multiple entrypoints (#10829)

* feat(api-extractor): support multiple entrypoints

* chore: initial support in generateSplitDocumentation

* chore: bring in line with upstream

* refactor: multiple entrypoints in scripts

* fix: split docs

* feat: website

* fix: docs failing on next

* fix: don't include dtypes for now

* refactor: don't fetch entrypoint if there is none

---------

Co-authored-by: iCrawl <buechler.noel@outlook.com>
This commit is contained in:
Qjuh
2025-05-12 23:48:41 +02:00
committed by GitHub
parent 4f5e5c7c14
commit b3db92edfb
93 changed files with 2330 additions and 1956 deletions

View File

@@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.
import * as os from 'node:os';
import process from 'node:process';
import { InternalError } from '@rushstack/node-core-library';
import { CommandLineParser, type CommandLineFlagParameter } from '@rushstack/ts-command-line';
import colors from 'colors';
@@ -30,23 +31,22 @@ export class ApiExtractorCommandLine extends CommandLineParser {
});
}
protected override async onExecute(): Promise<void> {
protected override async onExecuteAsync(): Promise<void> {
// override
if (this._debugParameter.value) {
InternalError.breakInDebugger = true;
}
process.exitCode = 1;
try {
await super.onExecute();
await super.onExecuteAsync();
process.exitCode = 0;
} catch (error: any) {
if (this._debugParameter.value) {
console.error(os.EOL + error.stack);
} else {
console.error(os.EOL + colors.red('ERROR: ' + error.message.trim()));
}
// eslint-disable-next-line no-restricted-globals
process.exitCode = 1;
}
}

View File

@@ -20,8 +20,7 @@ export class InitAction extends CommandLineAction {
});
}
protected async onExecute(): Promise<void> {
// override
protected override async onExecuteAsync(): Promise<void> {
const inputFilePath: string = path.resolve(__dirname, './schemas/api-extractor-template.json');
const outputFilePath: string = path.resolve(ExtractorConfig.FILENAME);

View File

@@ -83,8 +83,7 @@ export class RunAction extends CommandLineAction {
});
}
protected async onExecute(): Promise<void> {
// override
protected override async onExecuteAsync(): Promise<void> {
const lookup: PackageJsonLookup = new PackageJsonLookup();
let configFilename: string;