{"id":25837263,"url":"https://github.com/devtin/duck-worker","last_synced_at":"2025-09-06T10:36:03.931Z","repository":{"id":57216953,"uuid":"335449994","full_name":"devtin/duck-worker","owner":"devtin","description":"duckfficer service worker that serves an ipc bridge for communication","archived":false,"fork":false,"pushed_at":"2021-02-03T01:49:17.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-09-06T10:36:03.069Z","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/devtin.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}},"created_at":"2021-02-02T23:19:29.000Z","updated_at":"2021-02-03T01:49:19.000Z","dependencies_parsed_at":"2022-08-28T21:40:16.998Z","dependency_job_id":null,"html_url":"https://github.com/devtin/duck-worker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/devtin/duck-worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fduck-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fduck-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fduck-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fduck-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devtin","download_url":"https://codeload.github.com/devtin/duck-worker/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fduck-worker/sbom","scorecard":{"id":338492,"data":{"date":"2025-08-11","repo":{"name":"github.com/devtin/duck-worker","commit":"cb86557aad31a56e7f3f83ce586811f6517426f2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating node:12 to node:12@sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-vxvm-qww3-2fh7","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T05:15:39.064Z","repository_id":57216953,"created_at":"2025-08-18T05:15:39.064Z","updated_at":"2025-08-18T05:15:39.064Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273892835,"owners_count":25186561,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-03-01T02:48:05.723Z","updated_at":"2025-09-06T10:36:03.898Z","avatar_url":"https://github.com/devtin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\u003ch1\u003educk-worker\u003c/h1\u003e\u003c/div\u003e\n\n\u003cp\u003e\n    \u003ca href=\"https://www.npmjs.com/package/duck-worker\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/duck-worker.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n\u003ca href=\"http://opensource.org/licenses\" target=\"_blank\"\u003e\u003cimg src=\"http://img.shields.io/badge/License-MIT-brightgreen.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n    duckfficer service worker that serves an ipc bridge for communication\n\u003c/p\u003e\n\n## Installation\n\n```sh\n$ npm i duck-worker --save\n# or\n$ yarn add duck-worker\n```\n\n## Features\n\n- [duck worker client success](#duck-worker-client-success)\n- [duck worker client fail](#duck-worker-client-fail)\n- [duck worker provides ipc interface](#duck-worker-provides-ipc-interface)\n- [loads workers from folder](#loads-workers-from-folder)\n\n\n\u003ca name=\"duck-worker-client-success\"\u003e\u003c/a\u003e\n\n## duck worker client success\n\n\n```js\nconst client = await new DuckWorkerClient()\nt.is(await client.workerA('some payload'), 'received: some payload')\n```\n\n\u003ca name=\"duck-worker-client-fail\"\u003e\u003c/a\u003e\n\n## duck worker client fail\n\n\n```js\nconst client = await new DuckWorkerClient()\nawait t.throwsAsync(() =\u003e client.workerB('some error'), {\n  instanceOf: Error,\n  message: 'some error'\n})\n```\n\n\u003ca name=\"duck-worker-provides-ipc-interface\"\u003e\u003c/a\u003e\n\n## duck worker provides ipc interface\n\n\n```js\nipc.connectTo('worker')\nreturn new Promise((resolve) =\u003e {\n  ipc.of['worker'].on('pong', () =\u003e {\n    t.pass()\n    resolve()\n  })\n  ipc.of['worker'].emit('ping')\n})\n```\n\n\u003ca name=\"loads-workers-from-folder\"\u003e\u003c/a\u003e\n\n## loads workers from folder\n\n\n```js\nawait t.throwsAsync(() =\u003e client.taskA('something'), {\n  message: 'got: something'\n})\n\nt.like(await client.taskB({ name: 'Olivia' }), {\n  output: 'name is: Olivia'\n})\n\n\nconst r = await client.nameSpace.taskC('what is love?')\n\nt.like(r.errorsThrown[0], {\n  payload: 'what is love?'\n})\n```\n\n\n\u003cbr\u003e\u003ca name=\"DuckWorkerClient\"\u003e\u003c/a\u003e\n\n### DuckWorkerClient\n\n\u003cbr\u003e\u003ca name=\"new_DuckWorkerClient_new\"\u003e\u003c/a\u003e\n\n#### new DuckWorkerClient(appSpace, [clientId], [workerId])\n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| appSpace | \u003ccode\u003eString\u003c/code\u003e |  | default to local package.json-\u003ename |\n| [clientId] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003eclient\u003c/code\u003e |  |\n| [workerId] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003eworker\u003c/code\u003e |  |\n\n**Returns**: \u003ccode\u003ePromise.\u0026lt;{Object}\u0026gt;\u003c/code\u003e - the proxy to communicate with the worker  \n\n\u003cbr\u003e\u003ca name=\"duckWorkerIpc\"\u003e\u003c/a\u003e\n\n### duckWorkerIpc(workers, [appName], [id]) ⇒ \u003ccode\u003ePromise.\u0026lt;ipc.server\u0026gt;\u003c/code\u003e\n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| workers | \u003ccode\u003eObject\u003c/code\u003e |  | workers object mapping to functions |\n| [appName] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003e\u0026lt;package.json-\u0026gt;name\u0026gt;\u003c/code\u003e | the appName (defaults to project's package.json name) |\n| [id] | \u003ccode\u003eString\u003c/code\u003e | \u003ccode\u003eworker\u003c/code\u003e | worker id |\n\n\n\u003cbr\u003e\u003ca name=\"duckWorker\"\u003e\u003c/a\u003e\n\n### duckWorker(workerDir, [appName], [id]) ⇒ \u003ccode\u003eexports.\u0026lt;void\u0026gt;\u003c/code\u003e\n\n| Param | Type | Description |\n| --- | --- | --- |\n| workerDir | \u003ccode\u003eString\u003c/code\u003e | the worker dir |\n| [appName] | \u003ccode\u003eString\u003c/code\u003e | ipc appname |\n| [id] | \u003ccode\u003eString\u003c/code\u003e | ipc id |\n\n\n* * *\n\n### License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n\u0026copy; 2020-present Martin Rafael Gonzalez \u003ctin@devtin.io\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtin%2Fduck-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevtin%2Fduck-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtin%2Fduck-worker/lists"}