{"id":21198690,"url":"https://github.com/natlibfi/mongo-cleaner","last_synced_at":"2025-06-29T21:03:06.180Z","repository":{"id":144743777,"uuid":"551367837","full_name":"NatLibFi/mongo-cleaner","owner":"NatLibFi","description":"Mongo database cleaner. Removes all items from collection based on modificationTime time stamp (UTC)","archived":false,"fork":false,"pushed_at":"2025-06-27T03:44:07.000Z","size":1255,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-29T21:02:54.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NatLibFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-14T09:13:39.000Z","updated_at":"2025-05-06T13:07:18.000Z","dependencies_parsed_at":"2024-01-10T15:16:13.631Z","dependency_job_id":"30538f37-4d61-46e0-a6b1-a895df7e2b03","html_url":"https://github.com/NatLibFi/mongo-cleaner","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/NatLibFi/mongo-cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Fmongo-cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Fmongo-cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Fmongo-cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Fmongo-cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLibFi","download_url":"https://codeload.github.com/NatLibFi/mongo-cleaner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2Fmongo-cleaner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262667247,"owners_count":23345524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T19:52:58.571Z","updated_at":"2025-06-29T21:03:06.153Z","avatar_url":"https://github.com/NatLibFi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongo-cleaner\n\nMongo database cleaner. Removes all items from collection based on creationTime time stamp (UTC)\n\n**COMPATIBLE: MONGO 4.X**\n\n**NOT COMPATIBLE: MONGO 3.X**\n\n# Usage\n\n## Envs:\n* MONGO_URI='mongodb://localhost:43575'\n* MONGO_DATABASE_AND_COLLECTIONS='[{\"db\": \"\", \"collection\": \"collectionName\", \"removeDaysFromNow\": integer, \"removeProtected\": boolean, \"file\": boolean, (\"test\": boolean)}]'\n  * db: Database name, \"\" makes mongo to use default database.\n  * collection: Database collection name.\n  * removeDaysFromNow: How many days before \"now\" is log valid. invalid logs are removed\n  * removeProtected: Boolean variable for forcing removal of protected items. Defaults false.\n  * file: Boolean variable to determine file collection cleaning\n  * test: Boolean variable to determine if test params are to be used on file search. Mongo-memory-server and real mongo wants different types of time variables.\n\n## Debug envs:\n* LOG_LEVEL='debug'\n* MONGOMS_DEBUG=1\n\n## License and copyright\n\nCopyright (c) 2022-2025 **University Of Helsinki (The National Library Of Finland)**\n\nThis project's source code is licensed under the terms of **MIT** or any later version.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fmongo-cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatlibfi%2Fmongo-cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fmongo-cleaner/lists"}