{"id":15479819,"url":"https://github.com/gr2m/couchdb-remove-conflicts","last_synced_at":"2025-04-24T06:35:33.163Z","repository":{"id":66069560,"uuid":"47290316","full_name":"gr2m/couchdb-remove-conflicts","owner":"gr2m","description":"CLI tool to remove all conflicts from a CouchDB database","archived":false,"fork":false,"pushed_at":"2021-03-05T06:40:01.000Z","size":8,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T03:28:11.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/couchdb-remove-conflicts","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"gr2m"}},"created_at":"2015-12-02T21:42:25.000Z","updated_at":"2024-03-21T18:29:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8ce3d2a-78bd-4ef6-a1ba-470b57a62efe","html_url":"https://github.com/gr2m/couchdb-remove-conflicts","commit_stats":{"total_commits":9,"total_committers":3,"mean_commits":3.0,"dds":0.2222222222222222,"last_synced_commit":"96ed32f86e1184310d98048a60b40c910aec9de5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fcouchdb-remove-conflicts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fcouchdb-remove-conflicts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fcouchdb-remove-conflicts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fcouchdb-remove-conflicts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/couchdb-remove-conflicts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250336997,"owners_count":21414048,"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-10-02T04:27:22.978Z","updated_at":"2025-04-24T06:35:33.142Z","avatar_url":"https://github.com/gr2m.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gr2m"],"categories":[],"sub_categories":[],"readme":"# couchdb-remove-conflicts\n\n\u003e CLI tool to remove all conflicts from a CouchDB database\n\n## CLI Usage\n\n```bash\n# npm install --global couchdb-remove-conflicts\ncouchdb-remove-conflicts \u003curl\u003e\n```\n\n## Module Usage\n\n```js\nvar couchdbRemoveConflicts = require('couchdb-remove-conflicts')\ncouchdbRemoveConflicts(url, function (error, result) {\n  if (error) {\n    throw error\n  }\n\n  console.log(result)\n})\n```\n\n## \u003curl\u003e option\n\nThe `\u003curl\u003e` CLI argument or `couchdbRemoveConflicts(url, callback)` option must\nbe a URL of a CouchDB database or CouchDB root.\n\nExamples\n\n- `http://localhost:5984/dbname`  \n  deletes all conflicts in `dbname`\n- `http://username:password@couch.example.com/dbname`  \n  deletes all conflicts in `dbname`, authenticates with `username:password`\n- `http://username:password@couch.example.com`  \n  deletes all conflicts in all databases at the given CouchDB url\n\n## How it work\n\nThe `url` option gets passed to [nano](https://github.com/dscape/nano#nano). If\nthe `url` is a CouchDB root, then all databases are fetched (one by one),\notherwise only the one for the passed URL.\n\nFor each database, all docs are fetched with `?include_docs=true\u0026conflicts=true`\nand then separate `DELETE /\u003cdbname\u003e/\u003cdocid\u003e?rev=\u003crev\u003e` requests are sent for\nevery conflict, with max. 100 requests at once.\n\n## TODOs\n\n- [ ] add tests :)\n- [ ] add options to limit series of `DELETE` requests and database handling\n- [ ] allow to pass in username \u0026 password as `{auth: { username, password } }`\n\n## License\n\nApache-2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fcouchdb-remove-conflicts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Fcouchdb-remove-conflicts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fcouchdb-remove-conflicts/lists"}