{"id":37331043,"url":"https://github.com/piesocket/piesocket-js","last_synced_at":"2026-01-16T03:35:40.904Z","repository":{"id":36958446,"uuid":"294444043","full_name":"piesocket/piesocket-js","owner":"piesocket","description":"JavaScript WebSocket Client","archived":false,"fork":false,"pushed_at":"2024-03-19T08:10:46.000Z","size":8645,"stargazers_count":12,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-17T23:09:31.578Z","etag":null,"topics":["javascript","piesocket","pubsub","pubsubclient","websocket","websocket-client"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/piesocket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-09-10T15:08:55.000Z","updated_at":"2025-01-23T01:21:11.000Z","dependencies_parsed_at":"2024-06-21T15:35:53.591Z","dependency_job_id":"67afa1c3-c534-4b3c-b025-c1dc3626dd67","html_url":"https://github.com/piesocket/piesocket-js","commit_stats":{"total_commits":131,"total_committers":6,"mean_commits":"21.833333333333332","dds":"0.30534351145038163","last_synced_commit":"269c6effbf6aee35bf9db5f4b9c2d63207cbd64d"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/piesocket/piesocket-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piesocket","download_url":"https://codeload.github.com/piesocket/piesocket-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-js/sbom","scorecard":{"id":733518,"data":{"date":"2025-08-11","repo":{"name":"github.com/piesocket/piesocket-js","commit":"5f82831d10b8a5f730f93f43acd08b0003c7567e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"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":"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":"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":"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":"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/ci.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/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/piesocket/piesocket-js/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/piesocket/piesocket-js/ci.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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":"29 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-22T15:05:58.515Z","repository_id":36958446,"created_at":"2025-08-22T15:05:58.515Z","updated_at":"2025-08-22T15:05:58.515Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":["javascript","piesocket","pubsub","pubsubclient","websocket","websocket-client"],"created_at":"2026-01-16T03:35:40.745Z","updated_at":"2026-01-16T03:35:40.889Z","avatar_url":"https://github.com/piesocket.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PieSocket JavaScript Client\n\nA JavaScript Library for PieSocket Realtime.\n\nNote: This package is PieSocket Client SDK (to be used with frontend on browsers), if you are looking for the NodeJS Server SDK, please see [PieSocket-NodeJS](https://github.com/piesocket/piesocket-nodejs).\n\n## Installation\n\nYarn\n```\nyarn add piesocket-js\n```\n\nNPM\n```\nnpm i piesocket-js\n```\n\nCDN\n```html\n\u003cscript src=\"https://unpkg.com/piesocket-js@5\"\u003e\u003c/script\u003e\n```\n\n## Importing\n\nImport module:\n\n```javascript\nimport PieSocket from 'piesocket-js';\n```\n\nWith CDN/Browser:\n\n\nUse the `PieSocket.default` global variable, e.g. `var piesocket = new PieSocket.default({...})`\n\n\n## How To Use\nPieSocketJS offers Channels and Portals.\n\n### Channels\nChannels are realtime PubSub connections over WebSocket, they allow you to:\n\n- Subscribe to events on client side\n- Publish events from server\n- Publish events from client with C2C feature.\n\n\nSee the [Channels documentation](https://www.piesocket.com/docs/3.0/channels) to learn more about how to use Channels.\n\n### Portals\nPortals are programmable video streams over WebRTC, they allow you to build powerful video applications.\n\nSee the [Portals documentation](https://www.piesocket.com/docs/3.0/portals) to learn more about how to use Portals.\n\n## Configuration\nComplete list of allowed configuration options\n\n| Option                | Description                                     | Default  |\n| ----------------------------- | ----------------------------------------------------------------------------- | -------------- |\n| apiKey             | Required, Your PieSocket API key.                |  Demo key |\n| clusterId          | Your API key's cluster ID.                       |  `demo` |\n| clusterDomain          | Custom domain, if you have configured one in your account.                       |  `null` |\n| consoleLogs        | Logs useful connection info if set to `true`.                       |  `false` |\n| notifySelf        | Receive messages sent by self, pass `0` to disabled.                        |  `1` |\n| jwt        | JWT authentication token, skips authentication endpoint call.                        |  `null` |\n| presence        | Enable presence events on any channel, pass `1` to enabled.                     |  `0` |\n| authEndpoint        | Authentication endpoint for private channels.                     |  `/broadcasting/auth` |\n| authHeaders        | Headers to include with authEndpoint call.                   |  `{}` |\n| forceAuth        | Force authentication on all channels.                    |  `false` |\n| userId        | User ID, used when `user` does not exists in JWT payload.     |  `anonymous` |\n| blockchainTestMode        | Enable/disable test mode, defaults to `false` i.e., Ethereum main network. Set to `true` for Rinkeby test network.     |  `false` |\n| blockchainGasFee        | Gas fee to set on Ethereum contract calls     |  `41000` |\n\n\n## PieSocket Object\nList of available methods on the `PieSocket` object\n\n| Method                | Description                                     | Returns  |\n| ----------------------------- | ----------------------------------------------------------------------------- | -------------- |\n| subscribe(channelId)    | Subscribe to a channel.                       |  Channel Object |\n| unsubscribe(channelId)  | Un-subscribe from a channel.                  |  Boolean |\n| getConnections()        | Get list of all active connections/channels for this client. | Object |\n\n\n## Channel Object\nList of available methods on the `Channel` object\n\n| Method                | Description                                     \n| ----------------------------- | ----------------------------------------------------------------------------- \n| listen(\"event-name\", callback)    | Listen to an event.           \n| publish(\"event-name\", data, meta)  | Publish message from client.         \n| getMemberByUUID(uuid)  | Get a Presence member from their uuid.         \n| on(\"lifecycle-event\", callback)        | Listen to lifecycle events on the native [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) connection.\n| confirmOnBlockchain(event, transaction_hash)        | Create a proof-of-witness for a Blockchain message, on receiver's end.\n\n\n\n## Development\n- Clone the repo `git clone git@github.com:piesocket/piesocket-js.git`\n- Run `npm install`\n- Run `npm start`\n- Open `http://localhost:8080` in browser\n\nNow you can interactively test the SDK, add features and fix bugs.\n\n\nDocumentation: [PieSocket Realtime Docs](https://piesocket.com/docs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiesocket%2Fpiesocket-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiesocket%2Fpiesocket-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiesocket%2Fpiesocket-js/lists"}