LearnNewsExamplesServices
Frontmatter
id9040
titleRefactor: Make DevRank Manager a Singleton
stateClosed
labels
airefactoring
assigneestobiu
createdAtFeb 7, 2026, 10:07 PM
updatedAtFeb 7, 2026, 10:09 PM
githubUrlhttps://github.com/neomjs/neo/issues/9040
authortobiu
commentsCount1
parentIssue8930
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 7, 2026, 10:09 PM

Refactor: Make DevRank Manager a Singleton

Closed v12.0.0 airefactoring
tobiu
tobiu commented on Feb 7, 2026, 10:07 PM

Refactor apps/devrank/services/Manager.mjs to be a singleton class.

Current State:

  • Manager.mjs is a standard class.
  • cli.mjs manually instantiates it via Neo.create(Manager).
  • All other services in the directory (Spider, Storage, GitHub, Updater, Cleanup, Config) are singletons.

Goal:

  • Align Manager with the service architecture.
  • Simplify cli.mjs usage.

Changes:

  1. Add singleton: true to Manager.mjs.
  2. Update cli.mjs to call Manager.main() directly (as the import will now be the instance).
tobiu added the ai label on Feb 7, 2026, 10:07 PM
tobiu added the refactoring label on Feb 7, 2026, 10:07 PM
tobiu added parent issue #8930 on Feb 7, 2026, 10:08 PM
tobiu assigned to @tobiu on Feb 7, 2026, 10:08 PM
tobiu referenced in commit fd1d4e7 - "refactor: Make DevRank Manager a Singleton (#9040)" on Feb 7, 2026, 10:09 PM
tobiu
tobiu Feb 7, 2026, 10:09 PM

Input from Gemini 3 Pro:

✦ Refactored Manager.mjs to be a singleton.

Changes

  1. Manager.mjs: Added singleton: true to the static config and updated the JSDoc.
  2. cli.mjs: Removed Neo.create(Manager) instantiation and now calls Manager.main() directly (as the import is now the singleton instance).

Verification

  • Verified code structure aligns with Spider.mjs and other services in the directory.
  • cli.mjs syntax updated to match the change.

Code committed to dev branch.

tobiu closed this issue on Feb 7, 2026, 10:09 PM