{"id":19370630,"url":"https://github.com/evidence-dev/datasources","last_synced_at":"2025-02-24T14:24:01.155Z","repository":{"id":216877708,"uuid":"720125991","full_name":"evidence-dev/datasources","owner":"evidence-dev","description":"Monorepo containing additional data sources that can be used with Evidence","archived":false,"fork":false,"pushed_at":"2024-06-06T04:41:34.000Z","size":733,"stargazers_count":1,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-06T23:53:36.820Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evidence-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-11-17T16:22:15.000Z","updated_at":"2024-06-06T20:21:07.000Z","dependencies_parsed_at":"2024-06-06T06:12:40.889Z","dependency_job_id":"d4b5cfb1-a4cc-46b7-bcb3-01107c64f3e0","html_url":"https://github.com/evidence-dev/datasources","commit_stats":null,"previous_names":["evidence-dev/datasources"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdatasources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdatasources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdatasources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdatasources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evidence-dev","download_url":"https://codeload.github.com/evidence-dev/datasources/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240492535,"owners_count":19810113,"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-10T08:16:08.194Z","updated_at":"2025-02-24T14:24:01.127Z","avatar_url":"https://github.com/evidence-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Evidence - Data Source Plugin Examples\n\nThis repository demonstrates how to create a new data source as a plugin to Evidence. Additional instructions can be found in the [docs](https://docs.evidence.dev/plugins/creating-a-plugin/)\n\n## Examples In this Repository\n\n- [Google Sheets](https://github.com/evidence-dev/datasources/tree/main/gsheets)\n- [Influx DB](https://github.com/evidence-dev/datasources/tree/main/influxdb)\n\n## Creating your own plugin\n\nA plugin only _requires_ three files - others are optional, though can help with testing, documenting, and version control etc.\n\n```\nyour-plugin-repo/\n|-- README.md\n|-- package.json\n`-- index.mjs\n```\n\n- `README.md` - any required documentation for users\n- `package.json` - import any required dependencies, specify how the plugin is named in Evidence, and publish options\n- `index.mjs` - define how the data is fetched from your data source, and passed to Evidence. You normally need to:\n   - **Define Options**: Expose fields to allow users to configure their source: usernames, passwords, secrets, API keys etc\n   - **Create a Runner**: Extract data from a source either by running a query (SQL) or some other opearation (non-SQL)\n   - **Create a Test Function**: A simple query or operation to allow users to verify if connection is configured correctly\n   - **Transform Data**: Get extracted data into the table structure Evidence requires\n   - **Define Types**: Map each different data type to one of the four Evidence Types: NUMBER, DATE, STRING, BOOL\n \n## Publishing your plugin\n\nPlugins should be published to a registry to be accessible to Evidence projects.\n\nThe most popular registry for Node.js packages is npm.\n\n1. Create an [npm account](https://www.npmjs.com/signup)\n2. Login to your npm account\n```bash\nnpm login\n```\n3. Once you have configured your `package.json`, you can publish your package\n```\nnpm publish\n```\n   \n## Where to start\n\nWe recommend copying the `package.json` and `index.mjs` from one of the following as a starting point.\n\n- The [Postgres](https://github.com/evidence-dev/evidence/tree/main/packages/postgres) source is a good example for a SQL source\n- The [GSheets](https://github.com/evidence-dev/datasources/tree/main/gsheets) plugin is a good example for a Non-SQL source\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevidence-dev%2Fdatasources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevidence-dev%2Fdatasources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevidence-dev%2Fdatasources/lists"}