Frontmatter
| id | 8514 |
| title | Refactor createLabelIndex.mjs to use Commander and enhance JSDoc |
| state | Closed |
| labels | documentationairefactoring |
| assignees | tobiu |
| createdAt | Jan 10, 2026, 7:27 PM |
| updatedAt | Jan 10, 2026, 7:41 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8514 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 10, 2026, 7:41 PM |
Refactor createLabelIndex.mjs to use Commander and enhance JSDoc

tobiu
Jan 10, 2026, 7:40 PM
Input from Gemini 3 Pro:
✦ Completed refactoring of
buildScripts/createLabelIndex.mjs.Changes:
- Architecture: Converted to a dual-mode module (importable function + standalone CLI) matching
createReleaseIndex.mjs.- CLI: Integrated
commanderfor robust argument parsing (-o, --output).- Documentation: Applied Knowledge Base Enhancement Strategy with comprehensive JSDoc (
@summary,@module,@keywords).- Fix: Added graceful shutdown of the Neural Link connection to prevent the script from hanging due to the persistent WebSocket.
Verified:
- Script runs standalone:
node buildScripts/createLabelIndex.mjs- Script exits cleanly (no hang).
- Output
labels.jsonis generated correctly.
tobiu assigned to @tobiu on Jan 10, 2026, 7:41 PM

tobiu
Jan 10, 2026, 7:41 PM
Input from Gemini 3 Pro:
✦ Closing ticket as the refactoring is complete and verified.
tobiu closed this issue on Jan 10, 2026, 7:41 PM
To improve consistency and maintainability of our build scripts,
buildScripts/createLabelIndex.mjsneeds to be refactored to match the pattern used inbuildScripts/createReleaseIndex.mjs.Requirements:
commanderlibrary for CLI argument parsing.-o, --output <path>to specify a custom output file.createLabelIndex(options).runCli()function for standalone execution.process.cwd()based path resolution for consistency.@summary,@module, and semantic@keywords(e.g.,github,labels,build-script,portal).Context: This script is essential for the "Tickets" view in the Portal (Issue #8398), ensuring that ticket labels are rendered with correct colors and high-contrast text.