v1.5.1
v1.5.1 - Feature Consolidation & Dynamic Versioning
🎯 New Features
Feature Consolidation Architecture
Generate consolidated feature packages with modular sub-services and provider aggregation patterns.
Sub-Services for Feature Packages (includeSubServices option)
NX Unable to resolve @samuelho-dev/monorepo-library-generator:feature.
Unable to resolve local plugin with import path @samuelho-dev/monorepo-library-generator
Pass --verbose to see the stacktrace.
Generates organized service directory structure:
feature-cluster/
└── src/lib/server/services/
├── index.ts # Barrel export
├── backup/ # Individual sub-services
├── checkpoint/ # Each with service.ts, layers.ts
├── config/ # errors.ts, types.ts, index.ts
├── credentials/
└── discovery/
Provider Consolidation for Infra Packages (consolidatesProviders option)
NX Unable to resolve @samuelho-dev/monorepo-library-generator:infra.
Unable to resolve local plugin with import path @samuelho-dev/monorepo-library-generator
Pass --verbose to see the stacktrace.
Generates aggregated infrastructure layer:
// index.ts - Re-export all providers
export { Kubectl, Talos, Terraform, ArgoCD }
export { ClusterInfrastructureLive } from "./lib/layers"
export { ClusterOrchestrator } from "./lib/orchestrator"
// layers.ts - Merge all provider layers
export const ClusterInfrastructureLive = Layer.mergeAll(
KubectlLive, TalosLive, TerraformLive, ArgoCDLive
)
// orchestrator.ts - Multi-provider coordination
export class ClusterOrchestrator extends Context.Tag("ClusterOrchestrator")<
ClusterOrchestrator,
{ /* orchestration methods */ }
>() {}Templates Added (10 new files):
- Sub-service templates: service, layers, errors, types, index
- Provider consolidation: index, layers, orchestrator
- Core generators: sub-services.ts, provider-consolidation.ts
Dynamic Version System
CLI and MCP server now dynamically read version from package.json instead of hardcoded values.
- Auto-generates
src/version.tsduring build viascripts/generate-version.mjs - Version stays in sync across package.json, CLI output, and MCP server
- Added to prebuild script for automatic generation
🐛 Bug Fixes
Template Interpolation (src/generators/provider/templates/layers.template.ts)
- Fixed className interpolation using template literals instead of regular strings
- Now correctly generates
StripeInternalErrorinstead of literal${className}InternalError
Build System
- Fixed TypeScript compilation errors (unused variables, incorrect Effect imports)
- Updated publish script to use
test:cifor proper test execution - All 166 files now compile successfully
Test Infrastructure
- Fixed test expectations to match actual template output
- Updated vitest.config.local.ts to include
src/**/*.spec.ts - Added
fileParallelism: falseto prevent NX graph conflicts - Increased timeout to 30s for generator tests
- All 205 tests now passing
📊 Impact
Files Changed: 28 files
- Added: 11 files (+688 lines)
- Modified: 17 files (-23 lines)
Generator Enhancements:
- Feature generator: Sub-service architecture support
- Infra generator: Provider consolidation support
- Build system: Dynamic version management
- Template engine: Fixed interpolation bugs
🔧 Technical Details
Schema Updates:
feature/schema.json: AddedincludeSubServices,subServicesoptionsinfra/schema.json: AddedconsolidatesProviders,providersoptions
Core Generator Changes:
core/feature.ts: Integrated sub-service generationcore/infra.ts: Integrated provider consolidation with conditional index generation- Concurrent file generation with Effect.forEach
Backward Compatibility: ✅ Fully backward compatible
- New options are optional (default: false)
- Existing generators work unchanged
- No breaking changes to templates or APIs
📦 Package: @samuelho-dev/monorepo-library-generator@1.5.1
📚 Changelog: See CHANGELOG.md
🐛 Issues: Report bugs