{"id":28684912,"url":"https://github.com/node-modules/zookeeper-cluster-client","last_synced_at":"2026-03-13T17:33:51.747Z","repository":{"id":23275440,"uuid":"98263140","full_name":"node-modules/zookeeper-cluster-client","owner":"node-modules","description":"Sharing one zookeeper connection among Multi-Process on Node.js","archived":false,"fork":false,"pushed_at":"2021-12-28T01:09:52.000Z","size":47,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-09-30T08:35:56.092Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-modules.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-25T04:09:20.000Z","updated_at":"2023-04-17T03:18:49.000Z","dependencies_parsed_at":"2022-07-15T13:47:03.493Z","dependency_job_id":null,"html_url":"https://github.com/node-modules/zookeeper-cluster-client","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/node-modules/zookeeper-cluster-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fzookeeper-cluster-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fzookeeper-cluster-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fzookeeper-cluster-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fzookeeper-cluster-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-modules","download_url":"https://codeload.github.com/node-modules/zookeeper-cluster-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-modules%2Fzookeeper-cluster-client/sbom","scorecard":{"id":692058,"data":{"date":"2025-08-11","repo":{"name":"github.com/node-modules/zookeeper-cluster-client","commit":"f1bf56d5603a61e0107a676d5f20eaa51accaac1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Code-Review","score":1,"reason":"Found 5/30 approved changesets -- score normalized to 1","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/node-modules/zookeeper-cluster-client/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/node-modules/zookeeper-cluster-client/nodejs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/node-modules/zookeeper-cluster-client/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:46","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 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"}}]},"last_synced_at":"2025-08-22T02:31:37.386Z","repository_id":23275440,"created_at":"2025-08-22T02:31:37.386Z","updated_at":"2025-08-22T02:31:37.386Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30471721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2025-06-14T03:07:41.880Z","updated_at":"2026-03-13T17:33:51.717Z","avatar_url":"https://github.com/node-modules.png","language":"JavaScript","readme":"# zookeeper-cluster-client\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/node-modules/zookeeper-cluster-client/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/zookeeper-cluster-client/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![NPM download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/zookeeper-cluster-client.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/zookeeper-cluster-client\n[codecov-image]: https://codecov.io/gh/node-modules/zookeeper-cluster-client/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/node-modules/zookeeper-cluster-client\n[snyk-image]: https://snyk.io/test/npm/zookeeper-cluster-client/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/zookeeper-cluster-client\n[download-image]: https://img.shields.io/npm/dm/zookeeper-cluster-client.svg?style=flat-square\n[download-url]: https://npmjs.org/package/zookeeper-cluster-client\n\nSupport [cluster-client](https://www.npmjs.com/package/cluster-client) process model on [node-zookeeper-client](https://www.npmjs.com/package/node-zookeeper-client).\n\n## Install\n\n```bash\nnpm i zookeeper-cluster-client --save\n```\n\n## Usage\n\n1\\. Create a node using given path:\n\n```js\nconst zookeeper = require('zookeeper-cluster-client');\nconst client = zookeeper.createClient('localhost:2181');\nconst path = process.argv[2];\n\nclient.once('connected', async function() {\n  await client.create(path);\n  console.log('Node: %s is successfully created.', path);\n  await client.close();\n});\n\nclient.connect();\n```\n\n2\\. List and watch the children of given node:\n\n```js\nconst zookeeper = require('zookeeper-cluster-client');\nconst client = zookeeper.createClient('localhost:2181');\nconst path = process.argv[2];\n\nasync function listChildren(client, path) {\n  const children = await client.getChildren(\n    path,\n    event =\u003e {\n      console.log('Got watcher event: %s', event);\n      listChildren(client, path);\n    });\n  console.log('Children of %s are: %j.', path, children);\n}\n\nclient.once('connected', () =\u003e {\n  console.log('Connected to ZooKeeper.');\n  listChildren(client, path);\n});\n\nclient.connect();\n```\n\n## Support APIs\n\n- [x] `createClient(connectionString, [options])`\n- [x] `connect()`\n- [x] `close()`: return promise\n- [x] `async create(path, [data], [acls], [mode])`\n- [x] `async remove(path, [version])`\n- [x] `async setData(path, data, [version])`\n- [x] `async getACL(path, [options])`\n- [x] `async setACL(path, acls, [version])`\n- [x] `async mkdirp(path, [data], [acls], [mode])`\n- [x] `async exists(path, [watcher])`\n- [x] `async getChildren(path, [watcher], [options])`\n- [x] `async getData(path, [watcher], [options])`\n- [ ] `addAuthInfo(scheme, auth)`\n- [x] `State getState()`\n- [x] `Buffer getSessionId()`\n- [x] `Buffer getSessionPassword()`\n- [x] `Number getSessionTimeout()`\n- [ ] `transaction()`\n\n### Extends APIs\n\nProvides some useful APIs beyond node-zookeeper-client.\n\n- [x] `watch(path, listener)`\n\n  ```js\n  client.watch('/foo', (err, data, stat) =\u003e {\n    if (err) {\n      // handle error\n      return;\n    }\n    console.log('data =\u003e %s', data.toString());\n    console.log('stat =\u003e %s', stat);\n  });\n  ```\n\n- [x] `watchChildren(path, listener)`\n\n  ```js\n  client.watchChildren('/foo', (err, children, stat) =\u003e {\n    if (err) {\n      // handle error\n      return;\n    }\n    console.log('children =\u003e %j', children);\n    console.log('stat =\u003e %s', stat);\n  });\n  ```\n\n## License\n\n[MIT](LICENSE.txt)\n\n## Contributors\n\n[![](https://ergatejs.implements.io/badges/contributors/node-modules/zookeeper-cluster-client.svg?size=96)](https://github.com/node-modules/zookeeper-cluster-client/graphs/contributors)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-modules%2Fzookeeper-cluster-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-modules%2Fzookeeper-cluster-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-modules%2Fzookeeper-cluster-client/lists"}