-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I would like to bring attention to a concern regarding the file deletion logic in the TypedSignalR.Client.TypeScript generator, specifically in the code found here.
Currently, the implementation deletes all *.ts files in the specified folder used for client generation. This behavior can lead to unintended consequences, particularly for users who may have existing TypeScript files in the same directory. In my experience, this resulted in the accidental deletion of important .ts files, which can disrupt ongoing development efforts.
To improve the safety and usability of this feature, I recommend considering the following options:
Prefix-Based Deletion: Implement a mechanism that only deletes files with a specific prefix associated with the generated client. This would help prevent the removal of unrelated files. However, this approach still carries the risk of accidental deletion if a user creates a file with the same prefix.
Removal of Deletion Logic: Alternatively, it may be beneficial to remove the file deletion logic entirely. This would ensure that users retain their existing files and avoid potential data loss.
I believe addressing this issue will enhance the overall user experience and prevent unintended disruptions. Thank you for your attention to this matter.