Conversation
🦋 Changeset detectedLatest commit: 4d0dfc5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request adds lazy loading for commands that depend on Changes
Sequence DiagramsequenceDiagram
actor User
participant CLI as CLI Entry Point
participant ModuleLoader as Module System
participant CommandModule as Command Module
User->>CLI: Execute command (db push/validate, schema build, secrets)
CLI->>CLI: Check command type
alt Stack-dependent command
CLI->>ModuleLoader: Dynamic import with requireStack()
ModuleLoader->>ModuleLoader: Attempt module load
alt Module found
ModuleLoader-->>CommandModule: Module loaded
CommandModule-->>CLI: Return command function
CLI->>CommandModule: Execute command
CommandModule-->>User: Command output
else Module not found (ERR_MODULE_NOT_FOUND)
ModuleLoader-->>CLI: Error caught
CLI->>CLI: Log installation guidance
CLI->>User: Exit with error status 1
end
else Other command
CLI->>CommandModule: Execute normally
CommandModule-->>User: Command output
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
@cipherstash/stackas optional and implementing lazy loading for dependent commands. Users will now receive clear error instructions if attempting to use features requiring this optional dependency without it installed.