Skip to content

Commit 9d59006

Browse files
committed
chore: other minor var renames
1 parent e34f773 commit 9d59006

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

src/generators/jsx-ast/index.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ export default {
6464
/**
6565
* Generates a JSX AST
6666
*
67-
* @param {Input} entries
67+
* @param {Input} input
6868
* @param {Partial<GeneratorOptions>} options
6969
* @returns {AsyncGenerator<Array<string>>}
7070
*/
71-
async *generate(entries, { index, releases, version, worker }) {
72-
const groupedModules = groupNodesByModule(entries);
73-
const headNodes = getSortedHeadNodes(entries);
71+
async *generate(input, { index, releases, version, worker }) {
72+
const groupedModules = groupNodesByModule(input);
73+
const headNodes = getSortedHeadNodes(input);
7474

7575
// Pre-compute docPages once in main thread
7676
const docPages = index
@@ -79,14 +79,14 @@ export default {
7979

8080
// Create sliced input: each item contains head + its module's entries
8181
// This avoids sending all 4700+ entries to every worker
82-
const input = headNodes.map(head => ({
82+
const entries = headNodes.map(head => ({
8383
head,
8484
entries: groupedModules.get(head.api),
8585
}));
8686

8787
const deps = { docPages, releases, version };
8888

89-
for await (const chunkResult of worker.stream(input, input, deps)) {
89+
for await (const chunkResult of worker.stream(entries, entries, deps)) {
9090
yield chunkResult;
9191
}
9292
},

src/generators/llms-txt/index.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ export default {
2424
/**
2525
* Generates a llms.txt file
2626
*
27-
* @param {Input} entries
27+
* @param {Input} input
2828
* @param {Partial<GeneratorOptions>} options
2929
* @returns {Promise<void>}
3030
*/
31-
async generate(entries, { output }) {
31+
async generate(input, { output }) {
3232
const template = await readFile(
3333
join(import.meta.dirname, 'template.txt'),
3434
'utf-8'
3535
);
3636

37-
const apiDocsLinks = entries
38-
// Filter non top-level headings
37+
const apiDocsLinks = input
3938
.filter(entry => entry.heading.depth === 1)
4039
.map(entry => `- ${buildApiDocLink(entry)}`)
4140
.join('\n');

src/generators/orama-db/index.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export function buildHierarchicalTitle(headings, currentIndex) {
4444
*/
4545
export default {
4646
name: 'orama-db',
47+
4748
version: '1.0.0',
49+
4850
description: 'Generates the Orama database for the API docs.',
4951

5052
dependsOn: 'metadata',

src/generators/web/index.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export default {
2727
/**
2828
* Main generation function that processes JSX AST entries into web bundles.
2929
*
30-
* @param {import('../jsx-ast/utils/buildContent.mjs').JSXContent[]} entries - JSX AST entries to process.
30+
* @param {import('../jsx-ast/utils/buildContent.mjs').JSXContent[]} input - JSX AST entries to process.
3131
* @param {Partial<GeneratorOptions>} options - Generator options.
3232
* @param {string} [options.output] - Output directory for generated files.
3333
* @param {string} options.version - Documentation version string.
3434
* @returns {Promise<import('../jsx-ast/utils/buildContent.mjs').JSXContent[]>}
3535
*/
36-
async generate(entries, { output, version }) {
36+
async generate(input, { output, version }) {
3737
const template = await readFile(
3838
new URL('template.html', import.meta.url),
3939
'utf-8'
@@ -47,7 +47,7 @@ export default {
4747

4848
// Process all entries: convert JSX to HTML/CSS/JS
4949
const { results, css, chunks } = await processJSXEntries(
50-
entries,
50+
input,
5151
template,
5252
astBuilders,
5353
requireFn,

0 commit comments

Comments
 (0)