-
Notifications
You must be signed in to change notification settings - Fork 36
Removing purge.js file from project config root does not remove the purge settings #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hi @sugat009 i have solved the issue locally but i have a question regarding raising a pr specifically for this issue |
That's incredible @rishabhr4 . We keep everything as open and public as possible. We can discuss this here if needed and we also have a forum: https://forum.communityhealthtoolkit.org/ |
ok so purging logic is present in /test/data/compile-app-settings/base-settings |
I believe there might be some confusion. The logic for data purging is defined in the Please note that the files you referenced are test files. To achieve the existing behavior, you will need to edit the logic within this file: cht-conf/src/fn/compile-app-settings.js Line 132 in 75a5c06
|
ok on investigating i found out this issue arises when there is no base_settings.json file present in app_settings folder in the root directory |
hi @sugat009 |
@rishabhr4 I think you are deviating from this task. I'll give you some more details. A project in this context is a collection of configurations. For eg: project
├── forms.json
└── schedules.json Here, If you run this tool(cht-conf) from within the Now, after all, this is set up. Try doing the recreation steps from the details of this ticket. The NOTE: |
thank you for the help |
hello @rishabhr4 , any updates on this? |
sorry @sugat009 i have my exams going on which will be finishing this week |
![]() ![]() hello @sugat009 i created the new folder and tried to worked on the issue |
Thanks for investigating this @rishabhr4 and awesome finding. We now know that this does not happen when the project config structure has the However, there is another way of configuring a project as well, (and my bad for now mentioning this above anywhere). A In the video, I'm running the cht-conf commands in the cht-core repo's default config folder. 2025-04-09.22-05-24.mp4 |
hi @sugat009 please review the pr thanks for the support , help and patience. |
🎉 This issue has been resolved in version 4.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
The way to add purging to a project is to add a
purge.js
file to the project config root as per the docs. So, naturally, to remove purging from a project, a user would think that removingpurge.js
would be the way to do so, but it doesn't work. If you empty thepurge.js
file, it creates an empty object in thepurge
key of the settings JSON file but it's not ideal to have an empty object even in the database.To Reproduce
Steps to reproduce the behavior:
purge.js
file and add your purge logiccht compile-app-settings
app_settings.json
file. A new keypurge
should have been minified created with the content from thepurge.js
.purge.js
file.cht-compile-app-settings
app_settings.json
file. Thepurge
key still exists.Expected behavior
When I delete or move or rename the
purge.js
file from the root of the project config, the settings should also remove thepurge
key from the JSON file.Logs
If applicable, include the cht-conf output, server logs, and/or browser logs.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional context
Add any other context about the problem here. What have you tried? Is there a workaround?
The text was updated successfully, but these errors were encountered: