Skip to content

feat(curl): add support for Windows CMD-style curl command parsing an…#8207

Open
Hoi1811 wants to merge 1 commit into
usebruno:mainfrom
Hoi1811:fix-parse-curl-cmd
Open

feat(curl): add support for Windows CMD-style curl command parsing an…#8207
Hoi1811 wants to merge 1 commit into
usebruno:mainfrom
Hoi1811:fix-parse-curl-cmd

Conversation

@Hoi1811

@Hoi1811 Hoi1811 commented Jun 9, 2026

Copy link
Copy Markdown

…d tests

Description

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

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

  • New Features

    • Windows CMD curl commands are now fully supported with automatic normalization of escape sequences and line continuations, enabling seamless import without manual editing.
  • Tests

    • Added comprehensive test coverage for Windows CMD curl parsing, verifying escape sequence handling, CRLF line continuations, quoted value decoding, and backward compatibility with bash-style commands.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds Windows CMD-style curl command parsing to Bruno's curl import utility. A new normalization helper strips caret-escapes from CMD-formatted input, integrating into the existing parser before bash-oriented decoding runs. Tests validate both escaped and unescaped command handling.

Changes

Windows CMD curl parsing support

Layer / File(s) Summary
Windows CMD caret-escape normalization
packages/bruno-app/src/utils/curl/parse-curl.js
normalizeWindowsCmdCurl detects ^" and removes caret-escapes via regex; cleanCurlCommand calls it first to normalize CMD input before downstream $'..' escape decoding.
Windows CMD curl parsing tests
packages/bruno-app/src/utils/curl/parse-curl.spec.js
Test suite verifies caret-escaped/line-continued CMD input produces correct method, url, headers, and data fields, and confirms non-escaped bash commands remain unaltered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Windows CMD goes ^"curl^" with carets and care,
Strip them all bare, then parse them fair,
Bash and CMD now sit side by side,
Tests lock in place with nothing to hide. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding support for Windows CMD-style curl command parsing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant