Skip to content

Conversation

@IgorDuino
Copy link

This pull request adds support for batch processing of multiple URLs in the sourcemapper tool, allowing users to specify a file or read from stdin. It also refactors the codebase to support these new input methods, updates the CLI interface, and improves documentation to reflect these enhancements.

Batch URL Processing Support:

  • Added -file and -stdin flags to allow processing multiple URLs from a file or standard input, respectively. Only one of -url, -jsurl, -file, or -stdin can be specified at a time. (main.go, README.md) [1] [2] [3] [4]
  • Implemented helper functions readURLsFromFile and readURLsFromStdin to load URLs for batch processing, and a processURLs function to handle them. (main.go) [1] [2]

Refactoring and CLI Improvements:

  • Refactored the main logic to delegate single and batch processing to dedicated functions, improving code organization and error handling. (main.go) [1] [2]
  • Updated CLI usage and help output to document new flags and clarify mutual exclusivity of input options. (main.go, README.md) [1] [2]

Documentation Updates:

  • Expanded the README.md with examples and explanations for the new -file and -stdin features, including integration with tools like httpx. (README.md)

Enhanced Source Map Handling:

  • Improved detection and handling of URLs for both JavaScript and sourcemap files, including automatic type detection based on file extension. (main.go)

These changes make sourcemapper more flexible and user-friendly for bulk operations and integration with other tools.

Copilot AI and others added 14 commits December 10, 2025 17:49
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
…ality

Add batch processing via file input and stdin piping
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
Co-authored-by: IgorDuino <74809945+IgorDuino@users.noreply.github.com>
…g-module

Add module updates and release workflow for cross-platform builds
@denandz
Copy link
Owner

denandz commented Dec 14, 2025

Hi, this feature seems like a reasonable addition; however, there are multiple issues with your PR.

  • Github actions release workflow is entirely unrelated
  • You transfer the ownership of the repository in the go.mod file and Readme files
  • Was there are reason for the Go version bump to 1.22?
  • The readme is doubling up on warnings

On the code side, there is:

  • STDIN and Batch processing lumped into the same PR - which is probably fine
  • Code duplication
  • Significant code changes for a relatively small feature
  • Poor error handling - how do i know if one of the URLs in the batch failed? should the batch continue? should it stop?
  • potential sourcemap overwriting issues when two URLs in the same batch try to write the same file. webpack://src/app.js for example.

Have you completed any testing to make sure these features work?

No offense, but overall this PR feels like AI slop.

@IgorDuino IgorDuino marked this pull request as draft December 17, 2025 02:47
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