add support for additional context roots in opencollection#6995
add support for additional context roots in opencollection#6995bijin-bruno merged 3 commits intousebruno:mainfrom
Conversation
WalkthroughAdded a new optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/bruno-filestore/src/formats/yml/parseCollection.ts`:
- Around line 41-48: The current assignment trusts
brunoExtensions.script.additionalContextRoots and may copy non-array values into
brunoConfig.scripts.additionalContextRoots; update the block that reads
brunoExtensions (from oc.extensions?.bruno) to first check
Array.isArray(brunoExtensions?.script?.additionalContextRoots) and then assign a
sanitized array (e.g., filter to only string values) to
brunoConfig.scripts.additionalContextRoots — only set the property when the
value is a valid string[] to avoid corrupting brunoConfig.scripts.
| if (!oc.extensions.bruno) { | ||
| oc.extensions.bruno = {}; | ||
| } | ||
| (oc.extensions.bruno as any).script = { |
There was a problem hiding this comment.
I think this should be scripts instead of script
Description
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
Release Notes