Skip to content

feat(core): improve logging for plugin auto-installation#80

Merged
michaelbe812 merged 1 commit intomainfrom
feat/73-improve-logging
Jan 21, 2026
Merged

feat(core): improve logging for plugin auto-installation#80
michaelbe812 merged 1 commit intomainfrom
feat/73-improve-logging

Conversation

@michaelbe812
Copy link
Contributor

Summary

  • Add user confirmation prompt before auto-installing packages (y/n)
  • Log detected package manager (npm/pnpm/yarn) when installing
  • Hide stack traces from user-facing logs, show full details in debug/verbose mode only
  • Add skipPrompt option to loadPlugin() for programmatic usage

Closes #73

Changes

User-Facing Improvements

Before:

Loading plugin: openapi-tools
Attempting to load plugin from package: @nx-plugin-openapi/plugin-openapi
Failed to load plugin from node_modules: Error: Cannot find module '@nx-plugin-openapi/plugin-openapi'
Require stack:
- /Users/.../node_modules/@nx-plugin-openapi/core/src/lib/plugin-loader.js
- /Users/.../node_modules/@nx-plugin-openapi/core/src/executors/generate-api/executor.js

After:

Plugin '@nx-plugin-openapi/plugin-openapi' is not installed.
Would you like to install it using npm? (y/n) y
Installing @nx-plugin-openapi/plugin-openapi using npm...
Successfully installed @nx-plugin-openapi/plugin-openapi
Successfully loaded plugin: openapi-tools

API Changes

  • loadPlugin(name, opts) now accepts an optional skipPrompt: boolean option to bypass the interactive prompt (useful for CI/programmatic usage)

Test plan

  • Tests pass for all new behaviors
  • Non-interactive environments skip the prompt automatically
  • Package manager is logged correctly
  • Stack traces only appear in debug mode
  • Full test suite passes (156 tests)
  • Linting passes

🤖 Generated with Claude Code

- Add user confirmation prompt before auto-installing packages
- Log detected package manager (npm/pnpm/yarn) when installing
- Hide stack traces from user-facing logs, show in debug mode only
- Add skipPrompt option to loadPlugin for programmatic usage

Closes #73

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@michaelbe812 michaelbe812 merged commit 69169e8 into main Jan 21, 2026
1 check passed
@michaelbe812 michaelbe812 deleted the feat/73-improve-logging branch January 21, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: improve logging

1 participant