Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions tools/adev-api-extraction/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -92,26 +92,30 @@ function main() {

const normalized = moduleName.replace('@', '').replace(/[\/]/g, '_');

const output = JSON.stringify({
repo,
moduleLabel: moduleLabel || moduleName,
moduleName: moduleName,
normalizedModuleName: normalized,
entries: combinedEntries,
symbols: [
// Symbols referenced, originating from other packages
...apiDoc.symbols.entries(),

// Exported symbols from the current package
...apiDoc.entries.map(entry => [entry.name, moduleName]),

// Also doing it for every member of classes/interfaces
...apiDoc.entries.flatMap(entry => [
[entry.name, moduleName],
...getEntriesFromMembers(entry).map(member => [member, moduleName]),
]),
],
} as EntryCollection);
const output = JSON.stringify(
{
repo,
moduleLabel: moduleLabel || moduleName,
moduleName: moduleName,
normalizedModuleName: normalized,
entries: combinedEntries,
symbols: [
// Symbols referenced, originating from other packages
...apiDoc.symbols.entries(),

// Exported symbols from the current package
...apiDoc.entries.map(entry => [entry.name, moduleName]),

// Also doing it for every member of classes/interfaces
...apiDoc.entries.flatMap(entry => [
[entry.name, moduleName],
...getEntriesFromMembers(entry).map(member => [member, moduleName]),
]),
],
} as EntryCollection,
null,
2,
);

writeFileSync(outputFilenameExecRootRelativePath, output, {encoding: 'utf8'});
}
Expand Down
Loading