{"id":26811421,"url":"https://github.com/eyedea-io/syncano","last_synced_at":"2025-04-23T16:43:06.557Z","repository":{"id":38984743,"uuid":"129846259","full_name":"eyedea-io/syncano","owner":"eyedea-io","description":"Custom wrapper for syncano-core library","archived":false,"fork":false,"pushed_at":"2023-01-04T20:26:27.000Z","size":1141,"stargazers_count":2,"open_issues_count":16,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T19:01:44.799Z","etag":null,"topics":["syncano"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/eyedea-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-17T04:31:54.000Z","updated_at":"2020-02-14T15:34:26.000Z","dependencies_parsed_at":"2023-02-02T20:31:29.925Z","dependency_job_id":null,"html_url":"https://github.com/eyedea-io/syncano","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedea-io%2Fsyncano","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedea-io%2Fsyncano/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedea-io%2Fsyncano/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedea-io%2Fsyncano/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyedea-io","download_url":"https://codeload.github.com/eyedea-io/syncano/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266276,"owners_count":20749754,"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":["syncano"],"created_at":"2025-03-30T01:38:37.096Z","updated_at":"2025-03-30T01:38:37.638Z","avatar_url":"https://github.com/eyedea-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @eyedea/syncano\n\nCustom wrapper for @syncano/core library.\n\n[![npm version](https://img.shields.io/npm/v/@eyedea/syncano)](https://npmjs.com/package/@eyedea/syncano)\n[![license](https://img.shields.io/npm/l/@eyedea/syncano)](https://github.com/eyedea-io/syncano/blob/master/LICENSE)\n\n## Install\n\n```\n$ npm install --save @eyedea/syncano\n```\n\n## Usage\n\n```ts\nimport * as S from '@eyedea/syncano'\n\n// Define arguments that endpoint will receive\ninterface Args {\n  id: string\n}\n\nclass Endpoint extends S.Endpoint\u003cArgs\u003e {\n  async run(\n    {data, response /* users, endpoint etc. */}: S.Core, // Access to syncano\n    {args, meta, config}: S.Context\u003cArgs\u003e // Access to args, meta and config\n  ) {\n    if (!this.user) {\n      // Errors thrown using S.HttpError are returned as response. In this case:\n      // {message: 'Unauthorized!'} with status code 401\n      throw new S.HttpError('Unauthorized!', 401)\n    }\n\n    // You can directly return syncano query ...\n    return data.post.find(10)\n\n    // ... or use response method\n    response.json({posts}, 200)\n  }\n\n  // Any error thrown in `run` method can be handled using `endpointDidCatch` method\n  endpointDidCatch({message}: Error) {\n    this.syncano.response.json({message}, 400)\n  }\n}\n\nexport default async (ctx: S.Context) =\u003e S.init(MyEndpoint, ctx)\n```\n\n## Tests\n\nView [@eyedea/syncano-test](https://github.com/eyedea-io/syncano-test)\n\n## License\n\nMIT © \u003ca href=\"https://eyedea.io\"\u003eEyedea AS\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyedea-io%2Fsyncano","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyedea-io%2Fsyncano","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyedea-io%2Fsyncano/lists"}