{"id":15640442,"url":"https://github.com/fishrock123/bob","last_synced_at":"2025-09-04T02:34:35.353Z","repository":{"id":65990212,"uuid":"108051993","full_name":"Fishrock123/bob","owner":"Fishrock123","description":"🚰 binary data \"streams+\" via data producers, data consumers, and pull flow.","archived":false,"fork":false,"pushed_at":"2020-09-10T22:44:10.000Z","size":433,"stargazers_count":79,"open_issues_count":30,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-30T21:03:23.262Z","etag":null,"topics":["bob","node","nodejs","pull-streams","sink","source","streams"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Fishrock123.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","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}},"created_at":"2017-10-23T23:28:24.000Z","updated_at":"2024-07-29T14:49:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7202eee-b6eb-4c8c-b2fe-f4643f81a70b","html_url":"https://github.com/Fishrock123/bob","commit_stats":{"total_commits":97,"total_committers":3,"mean_commits":"32.333333333333336","dds":"0.020618556701030966","last_synced_commit":"163cc176982e4a7f29a5cbafbcec2ea8be3c86fb"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Fishrock123/bob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishrock123%2Fbob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishrock123%2Fbob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishrock123%2Fbob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishrock123%2Fbob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fishrock123","download_url":"https://codeload.github.com/Fishrock123/bob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fishrock123%2Fbob/sbom","scorecard":{"id":50640,"data":{"date":"2025-08-11","repo":{"name":"github.com/Fishrock123/bob","commit":"163cc176982e4a7f29a5cbafbcec2ea8be3c86fb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Code-Review","score":0,"reason":"Found 1/30 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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"39 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-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","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-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-3gx7-xhv7-5mx3","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","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-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-14T23:38:42.171Z","repository_id":65990212,"created_at":"2025-08-14T23:38:42.171Z","updated_at":"2025-08-14T23:38:42.171Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273542277,"owners_count":25124125,"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-04T02:00:08.968Z","response_time":61,"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":["bob","node","nodejs","pull-streams","sink","source","streams"],"created_at":"2024-10-03T11:35:26.100Z","updated_at":"2025-09-04T02:34:35.301Z","avatar_url":"https://github.com/Fishrock123.png","language":"JavaScript","readme":"# BOB\n\nA binary data \"streams+\" API \u0026 implementations via data producers, data consumers, and pull flow.\n\n_The name? B~~L~~OB — Matteo Collina._\n\n_Bytes Over Buffers — Thomas Watson_\n\nThis is [a Node.js strategic initiative](https://github.com/nodejs/TSC/blob/master/Strategic-Initiatives.md#current-initiatives) aiming to improve Node.js streaming data interfaces, both within Node.js core internally, and hopefully also as future public APIs.\n\n![Flow of data \u0026 errors though BOB sinks \u0026 sources](diagrams/BOB-errors-diagram.png \"Flow of data \u0026 errors though BOB sinks \u0026 sources\")\n\n## Published Modules\n\nThe following modules contain usable components (sources, sinks, or transforms) and are published to npm.\n- The status codes enum: [bob-status](https://github.com/Fishrock123/bob-status) _([npm](https://www.npmjs.com/package/bob-status))_\n- A file system source: [fs-source](https://github.com/Fishrock123/fs-source) _([npm](https://www.npmjs.com/package/fs-source))_\n- A file system sink: [fs-sink](https://github.com/Fishrock123/fs-sink) _([npm](https://www.npmjs.com/package/fs-sink))_\n- A zlib transform: [zlib-transform](https://github.com/Fishrock123/zlib-transform) _([npm](https://www.npmjs.com/package/zlib-transform))_\n- A crc32 transform: [crc-transform](https://github.com/Fishrock123/crc-transform) _([npm](https://www.npmjs.com/package/crc-transform))_\n- Header for the C++ api: [bob-base](https://github.com/Fishrock123/bob-base) _([npm](https://www.npmjs.com/package/bob-base))_\n\nThe following modules are not published but are 'functional'.\n- A TCP socket \"duplex\": [in \"socket\"](https://github.com/Fishrock123/socket)\n- A TCP server of \"duplex\" sockets: [also in \"socket\"](https://github.com/Fishrock123/socket)\n\n## API Reference\n\nThe following files serve as the API's reference:\n- The [Status Enum](reference-status-enum.js) - _Status codes_\n- A [Source](reference-source.js) - _The data provider_\n- A [Sink](reference-sink.js) - _The data consumer_\n- A [Passthrough](reference-passthrough.js) - _A good example of the whole API_\n- A [Verify Passthrough](reference-verify.js) - _A typechecking API enforcement passthrough_\n- A [Buffered Transform](reference-buffered-transform.js) - _An example of buffering_\n- [`bob.h`](https://github.com/Fishrock123/bob-base/blob/master/bob.h) - _The C++ header in 'bob-base'_\n\n### Examples\n\nThe composition of the classes looks like this:\n```js\nconst { Stream } = require('bob-streams')\n\nconst source = new Source(/* args */)\nconst xform = new Transform(/* args */)\nconst sink = new Sink(/* args */)\n\nconst stream = new Stream(source, xform, sink)\nstream.start(error =\u003e {\n  // The stream is finished when this is called.\n})\n```\n\nAn entire passthrough could look like this:\n```js\nclass PassThrough {\n  bindSource (source) {\n    source.bindSink(this)\n    this.source = source\n    return this\n  }\n\n  bindSink (sink) {\n    this.sink = sink\n  }\n\n  next (status, error, buffer, bytes) {\n    this.sink.next(status, error, buffer, bytes)\n  }\n\n  pull (error, buffer) {\n    this.source.pull(error, buffer)\n  }\n}\n```\n\n## API Extension Reference\n\nThe following files serve as API extension references:\n- [extension-stop](reference-extension-stop.js) - Tell a source to stop.\n  * Useful for dealing with timeouts on network APIs.\n\n## Project Approach\n\nHigh-level timeline:\n- Prototype separate from core entirely.\n- Move into nodejs org once JS \u0026 C++ APIs are significantly prototyped.\n- Begin transitioning Node.js internals once the APIs and perf are proved.\n- If an internal transition works out well, begin planning public APIs.\n\nAll of these steps necessitate the buy-in of many stakeholders, both in Node.js core and the greater Node.js ecosystem. This is a long-term project by necessity and design.\n\n## Goals\nSome collective goals for this initiative.\n\n- Both performance and ease-of-use are key.\n- Implementable in a performant and usable way for both JS and C++.\n- Browser portability is preferable.\n\n### Protocol\n_As a preface, \"protocol\" refers to a system with \"producer / source\" and \"consumer / sink\" endpoints._\n\nThe Protocol itself must be simple:\n- Pull-based: The consumer requests (\"pulls\") data from the producer.\n- Binary-only: Data is binary buffers only, \"object mode\" and string encodings are not supported at the protocol level.\n- Stateless: The protocol must not require state to be maintained out-of-band.\n  - _Non-normative: While the protocol itself does not require out-of-band state, actual operations almost always do._\n  - Minimize state assumed between calls.\n- One-to-one: The protocol assumes a one-to-one relationship between producer and consumer.\n- Timing agnostic: The protocol makes no timing (sync or async) assumptions.\n- No buffering: The protocol must not require buffering (although specific implementations might).\n  - _Non-normative: While the protocol itself does not require buffering, starting sources almost always do (including transforms)._\n- In-line errors and EOF: Errors, data, and EOF (\"end\") should flow through the same call path.\n\n### Consumer\n- Should make no assumption on the timing of when data will be received (sync or async).\n- Should own any preallocated memory (the buffer).\n- Must never make more than one data request upstream at the same time.\n\n## Performance\n\nPlease see [performance.md](performance.md) for profiling results \u0026 information.\n\nCurrent results estimate a 30% decrease of CPU time in bad cases, and up to 8x decrease in good cases. This should correlate to overall throughput but may not be exact.\n\n## Project Layout\n\nAPI reference examples sit in the top-level directory and are prefixed by `reference-`.\nThese are functional and tested when practical, notably `reference-verify`, `reference-passthrough`, and `verify-buffered-transform`.\n\nOther helpers, such as `Stream()`, reside in the `/helpers/` and `/tests/helpers` directories.\nAll useful and usable components in this repo are exported from `index.js` with the `bob-streams` npm module.\n\nFunctional sources, sinks, and so on can be found in their own npm modules. See [Published Modules](#Published Modules).\n\n### Development\n\n#### Tests\n\n`npm install \u0026\u0026 npm test`\n\n#### Building the addons\n\nThe addons are presently very out-of-date.\n\nYou must have a local install of Node master @ ~ 694ac6de5ba2591c8d3d56017b2423bd3e39f769\n\n```\nnpm i node-gyp\nnode-gyp rebuild --nodedir=your/local/node/dir -C ./addons/passthrough\nnode-gyp rebuild --nodedir=your/local/node/dir -C ./addons/fs-sink\nnode-gyp rebuild --nodedir=your/local/node/dir -C ./addons/fs-source\n```\n\n## License\n\n[MIT Licensed](license) — _[Contributions via DCO 1.1](contributing.md#developers-certificate-of-origin)_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishrock123%2Fbob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishrock123%2Fbob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishrock123%2Fbob/lists"}