Skip to content

Conversation

@Shipra-Singh-Asd
Copy link
Collaborator

  • Add comprehensive plugin system with 32 hook points across CLI lifecycle
  • Implement PluginSystem class with hookable library for robust hook management
  • Add plugin discovery, loading, and validation with priority-based execution
  • Support both local (.polyglot/plugins/) and external (npm packages) plugins
  • Add CLI commands for plugin management: list, info, enable, disable, configure
  • Integrate hooks throughout scaffold, dev, admin, and service management
  • Add comprehensive test coverage (22 test cases) for all plugin functionality
  • Add detailed documentation with examples and best practices
  • Fix service controls test race condition for better stability

Features:

  • Plugin discovery in .polyglot/plugins/ directory
  • Hook execution with rich context data passing
  • Error handling for malformed plugins and hook failures
  • Plugin configuration management with JSON persistence
  • External plugin support via npm packages
  • Priority-based plugin loading order
  • Comprehensive CLI interface for plugin operations

Hooks available: before:init, after:init, before:service:add, after:service:add, before:dev:start, after:dev:start, before:admin:start, after:admin:start, and 24 additional hook points for complete lifecycle coverage.

Summary

Explain the change in 1–3 sentences. Reference any related issues (e.g. Closes #123).

Type of Change

  • Feature
  • Bug fix
  • Chore / Refactor
  • Docs
  • Tests
  • CI / Build
  • Other

Motivation / Context

Why is this change needed? What problem does it solve or what capability does it add?

Approach

Briefly describe how you implemented the change. Note any notable design decisions, trade-offs, or alternatives considered.

CLI Impact

If this alters user-facing CLI behavior:

  • Added / changed flags? Describe.
  • Backward compatible? If breaking, explain migration path.
  • Sample invocation before vs after:
# before
# after

Generated Output Impact

List any new / modified scaffold files or structural differences (e.g. new template folder, changed Dockerfile pattern, compose changes, new preset behaviors).

Tests

Describe test coverage:

  • Added new test(s)
  • Updated existing test(s)
  • Manually smoke-tested locally
  • No tests needed (explain why)

If you ran the smoke scaffold locally, paste the command & confirm success:

node bin/index.js demo --services node --no-install --yes

Result: ✅ / ❌

Screenshots / Logs (Optional)

Add any helpful output (chalk-styled CLI messages, error reproduction, etc.).

Docs

  • Updated README.md if needed
  • Updated .github/copilot-instructions.md if internal conventions changed
  • Not applicable

Checklist

  • Code follows existing style (chalk usage, emoji prefixes, exit codes)
  • No accidental large asset additions outside templates/
  • Default ports preserved / conflicts handled
  • New service templates added to: choices array, defaultPorts, Dockerfile switch, compose mapping
  • Git history clean (no stray debug commits)
  • Dependency additions are minimal & justified

Open Questions / Follow-ups

List any TODOs or future enhancements not in this PR.


Thanks for contributing! 🎉

- Add comprehensive plugin system with 32 hook points across CLI lifecycle
- Implement PluginSystem class with hookable library for robust hook management
- Add plugin discovery, loading, and validation with priority-based execution
- Support both local (.polyglot/plugins/) and external (npm packages) plugins
- Add CLI commands for plugin management: list, info, enable, disable, configure
- Integrate hooks throughout scaffold, dev, admin, and service management
- Add comprehensive test coverage (22 test cases) for all plugin functionality
- Add detailed documentation with examples and best practices
- Fix service controls test race condition for better stability

Features:
- Plugin discovery in .polyglot/plugins/ directory
- Hook execution with rich context data passing
- Error handling for malformed plugins and hook failures
- Plugin configuration management with JSON persistence
- External plugin support via npm packages
- Priority-based plugin loading order
- Comprehensive CLI interface for plugin operations

Hooks available: before:init, after:init, before:service:add, after:service:add,
before:dev:start, after:dev:start, before:admin:start, after:admin:start,
and 24 additional hook points for complete lifecycle coverage.
@Shipra-Singh-Asd Shipra-Singh-Asd linked an issue Nov 11, 2025 that may be closed by this pull request
@Shipra-Singh-Asd Shipra-Singh-Asd marked this pull request as draft November 11, 2025 03:55
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.

Feature: Plugin hook execution pipeline

2 participants