peterknezek / har-to-mocks

Extract response from .har file and create JSON mocks for mock server.
MIT License
23 stars 12 forks source link

Prevent override of file if multiple XHR for same endpoint found and treat search params as folder #19

Closed sbimochan closed 1 month ago

sbimochan commented 7 months ago

Fixes #18

Context

Previously, the writeFileSync function would overwrite existing files without any checks, potentially leading to data loss. This change enhances the safety and reliability of file writing operations by preventing accidental overwrites.

What's Changed

Added a function to generate a unique filename dynamically. Modified the file writing logic to use the generated unique filename.

kshitish182 commented 7 months ago

Great feature! This was causing me a lot of data issues.