{"id":18244991,"url":"https://github.com/edgeapp/edge-server-tools","last_synced_at":"2025-04-04T13:31:56.981Z","repository":{"id":37594144,"uuid":"337231321","full_name":"EdgeApp/edge-server-tools","owner":"EdgeApp","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-11T17:26:43.000Z","size":311,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-03T01:02:12.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/EdgeApp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-08T22:50:31.000Z","updated_at":"2024-10-11T17:26:47.000Z","dependencies_parsed_at":"2024-11-03T01:00:34.933Z","dependency_job_id":"243e8f6a-a769-4bee-997c-1f7486faf685","html_url":"https://github.com/EdgeApp/edge-server-tools","commit_stats":{"total_commits":109,"total_committers":5,"mean_commits":21.8,"dds":"0.27522935779816515","last_synced_commit":"213c06db64d01408b3882c886a795a7e04b6fb15"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-server-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-server-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-server-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-server-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdgeApp","download_url":"https://codeload.github.com/EdgeApp/edge-server-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223144142,"owners_count":17094792,"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-05T09:18:31.200Z","updated_at":"2024-11-05T09:18:32.362Z","avatar_url":"https://github.com/EdgeApp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edge-server-utils\n\nThe [Edge Wallet](https://edge.app) uses a variety of back-end micro-services, including encrypted key backup, exchange rates, mining fees, and so forth. Most of these services use an Express frontend talking touch a CouchDB database, so this library contains common utility functions for working with these technologies.\n\nCleaners:\n\n- [`asCouchDoc`](./docs/as-couch-doc.md) - A cleaner for dealing with the `_id` and `_rev` fields CouchDB adds to documents.\n- [`asHealingObject`](./docs/as-healing-object.md) - A cleaner for repairing damaged objects using default values.\n- [`asMaybeConflictError`] - Passes for a CouchDB conflict error.\n- [`asMaybeExistsError`] - Passes for a CouchDB item exists error.\n- [`asMaybeNotFoundError`] - Passes for a CouchDB item missing error.\n\nCouchDB utilities:\n\n- `bulkGet` - Nano forgot to implement this method for some reason.\n- `makeRollingDatabase` - Treats a collection of databases as a single large database, organized by date range.\n- [`viewToStream`](./docs/view-to-stream.md) - Iterates over the documents in a database, partition, or view.\n\nCouchDB setup tools:\n\n- [`setupDatabase`](./docs/couch-setup.md) - Automatically creates a database, sets up replication and design documents, and subscribes to the changes feed.\n- [`makeJsDesign`](./docs/couch-setup.md#makeJsDesign) - Creates a JavaScript design document.\n- [`makeMangoIndex`](./docs/couch-setup.md#makeMangoIndex) - Creates a Mango index design document.\n- [`syncedDocument`](./docs/couch-setup.md#watching-settings-documents) - Watches a settings document for changes.\n\nAggregateError tools:\n\n- [`AggregateError`] - A ponyfill for the new ES2021 AggregateError type.\n- [`promiseAny`] - A ponyfill for the new ES2021 `Promise.any` method.\n- [`stringifyError`] - Turns an error into a string, with special handling for `AggregateError`.\n\nOther stuff:\n\n- `forkChildren` - Used for Node.js clustering.\n- `errorCause` - Adds an `error.cause` property.\n- `matchJson` - Returns `true` if two JSON-style objects match.\n- `makePeriodicTask` - Starts a periodic async task, with error handling and other features.\n\nDeprecated stuff:\n\n- `autoReplication` - Deprecated. Use the new `setupDatabase` stuff.\n- `createAdminUser`\n- `createRegularUser`\n- [`forEachDocument`](./docs/for-each-document.md) - Iterates over the documents in a Couch database. Use `viewToStream` instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeapp%2Fedge-server-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgeapp%2Fedge-server-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeapp%2Fedge-server-tools/lists"}