Skip to content

Conversation

jherr
Copy link
Collaborator

@jherr jherr commented Oct 6, 2025

Adding prisma support and along with it support for add-on options

timoconnellaus and others added 15 commits August 20, 2025 09:14
- Add Zod schemas for add-on option definitions
- Support conditional file generation with EJS templates
- Enable package.json.ejs for conditional dependencies
- Implement filename prefix stripping for database-specific files
- Create Drizzle add-on with database provider option
- Move add-on configuration from inline display to dedicated dialog
- Add settings button (gear icon) next to info icon for configurable add-ons
- Create new AddOnConfigDialog component with proper modal interface
- Fix reactive state subscription for add-on options in sidebar
- Clean up sidebar layout by removing inline configuration clutter
- Add proper default option initialization when add-ons are toggled
- Export add-on option types from engine for better type safety

Improves UX by providing dedicated space for configuration with clear
context while keeping the sidebar clean and compact.
- Enhanced --list-add-ons to show * for configurable add-ons
- Added --addon-details command to show comprehensive add-on information
- Added --add-on-config option for non-interactive configuration
- Supports discovering options, dependencies, routes, and all add-on metadata
Implements Phase 4 testing for the add-on options system with comprehensive unit test coverage:

- add-on-options.test.ts: Zod schema validation, default population, and error handling (15 tests)
- template-context.test.ts: EJS template context with addOnOption variable integration (12 tests)
- filename-processing.test.ts: Prefix stripping logic for __prefix__filename patterns (11 tests)
- conditional-packages.test.ts: EJS conditional package.json processing (11 tests)

Key test coverage areas:
- Option schema validation with comprehensive positive/negative cases
- Template variable integration and conditional file processing
- Filename prefix stripping (__option__filename.ext.ejs → filename.ext)
- Conditional package dependency generation via EJS templates
- Error handling for malformed options and templates

All 49 new tests pass, ensuring robust validation of the add-on options functionality.
- Document configuration format and option types in info.json
- Explain template usage with addOnOption variables
- Cover conditional file naming conventions with prefixes
- Provide complete examples for both React CRA and Solid frameworks
- Include CLI usage patterns for interactive and non-interactive modes
- Add best practices for add-on developers
- Add postInitScript field to add-on info schema
- Implement post-init script execution in special steps
- Update Prisma add-on with database initialization script
- Add comprehensive tests for post-init script functionality
- Handle script execution after package installation
- Fix bun package manager test expectation
@jherr jherr merged commit 85e89d2 into main Oct 6, 2025
@jherr jherr deleted the feature/add-on-options branch October 6, 2025 00:18
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.

2 participants