feat: improve init command UX and add monorepo support#14
Merged
Conversation
Fix frozen spinner during package install by replacing spawnSync with async spawn, keeping the event loop free so the clack spinner animates. Add gitignore step to the init wizard that ensures .domscribe is listed in the project's .gitignore (creates the file if needed, appends if missing, no-ops if already present).
…discovery Introduce domscribe.config.json for monorepo setups where the frontend app lives in a subdirectory (e.g. apps/web). The init wizard now asks if the project is a monorepo and writes a config file at the repo root pointing to the app root. Updated getWorkspaceRoot() discovery chain to check for config files in addition to .domscribe/ directories, so all CLI commands (serve, stop, status) and MCP connections resolve the app root automatically. Also fixes package manager detection in monorepos by checking lockfiles at the repo root rather than the app subdirectory.
|
View your CI Pipeline Execution ↗ for commit cb087fd
☁️ Nx Cloud last updated this comment at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spawnSyncwith asyncspawnso the clack spinner animates whilenpm installruns.domscribeto.gitignore— new init step that creates or appends to.gitignoreidempotentlydomscribe.config.jsonat the repo root pointing to the app subdirectory. All CLI commands (serve,stop,status) and MCP connections auto-resolve the app root from this config--app-rootflag — non-interactive monorepo init vianpx domscribe init --app-root apps/webTest plan
pnpm nx test domscribe-relay— 305 tests pass (config-loader, utils, monorepo-step, init-wizard, framework-step, gitignore-step)pnpm nx build domscribe-core && pnpm nx build domscribe-relay— builds passpnpm nx lint domscribe-relay— no module boundary violationsnpx domscribe initin a single-repo project — works as beforenpx domscribe init --app-root apps/webin a monorepo — writes config, installs in correct dirnpx domscribe init --dry-run— shows all steps without side effects