{"id":20161025,"url":"https://github.com/delight-rpc/piscina","last_synced_at":"2026-04-13T11:01:36.157Z","repository":{"id":44816589,"uuid":"444410900","full_name":"delight-rpc/piscina","owner":"delight-rpc","description":"🌿","archived":false,"fork":false,"pushed_at":"2026-02-26T09:18:44.000Z","size":1696,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T14:57:53.506Z","etag":null,"topics":["esm","library","nodejs","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@delight-rpc/piscina","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/delight-rpc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-04T12:29:04.000Z","updated_at":"2026-02-26T09:18:48.000Z","dependencies_parsed_at":"2025-01-13T13:46:45.792Z","dependency_job_id":"f53c3c90-5fdf-4c60-b0fb-459a9fbc2a80","html_url":"https://github.com/delight-rpc/piscina","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":"0.052631578947368474","last_synced_commit":"ee501204315b45c4a99c6535af4885aab4ccea1a"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/delight-rpc/piscina","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delight-rpc%2Fpiscina","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delight-rpc%2Fpiscina/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delight-rpc%2Fpiscina/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delight-rpc%2Fpiscina/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delight-rpc","download_url":"https://codeload.github.com/delight-rpc/piscina/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delight-rpc%2Fpiscina/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31749763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esm","library","nodejs","npm-package","typescript"],"created_at":"2024-11-14T00:16:57.315Z","updated_at":"2026-04-13T11:01:36.151Z","avatar_url":"https://github.com/delight-rpc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @delight-rpc/piscina\n## Install\n```sh\nnpm install --save @delight-rpc/piscina\n# or\nyarn add @delight-rpc/piscina\n```\n\n## Usage\n```ts\n// api.d.ts\ninterface IAPI {\n  echo(message: string): string\n}\n\n// worker.ts\nimport { createServer } from '@delight-rpc/piscina'\n\nconst api: IAPI = {\n  echo(message: string): string {\n    return message\n  }\n}\n\nconst [handler] = createServer(api)\n\nexport default handler\n\n// main.ts\nimport { createClient } from '@delight-rpc/piscina'\n\nconst piscina = new Piscina({\n  filename: new URL('./worker.js', import.meta.url).href\n})\nconst [client] = createClient\u003cIAPI\u003e(piscina)\n\nawait client.echo('hello world')\n```\n\n## API\n### createClient\n```ts\nfunction createClient\u003cIAPI extends object\u003e(\n  piscina: Piscina\n, options?: {\n    parameterValidators?: DelightRPC.ParameterValidators\u003cIAPI\u003e\n    expectedVersion?: string\n    channel?: string\n    timeout?: number\n  }\n): [client: DelightRPC.ClientProxy\u003cIAPI\u003e, close: () =\u003e void]\n```\n\n### createBatchClient\n```ts\nfunction createBatchClient\u003cDataType\u003e(\n  piscina: Piscina\n, options?: {\n    expectedVersion?: string\n    channel?: string\n    timeout?: number\n  }\n): [client: DelightRPC.BatchClient\u003cDataType\u003e, close: () =\u003e void]\n```\n\n### createServer\n```ts\nfunction createServer\u003cIAPI extends object\u003e(\n  api: DelightRPC.ImplementationOf\u003cIAPI\u003e\n, options?: {\n    parameterValidators?: DelightRPC.ParameterValidators\u003cIAPI\u003e\n    version?: `${number}.${number}.${number}`\n    channel?: string | RegExp | AnyChannel\n    ownPropsOnly?: boolean\n  }\n): [handler: (message: unknown) =\u003e Promise\u003cunknown\u003e, close: () =\u003e void]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelight-rpc%2Fpiscina","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelight-rpc%2Fpiscina","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelight-rpc%2Fpiscina/lists"}