{"_id":"@b2broker/signalr","_rev":"39-835ecba409a243b2f82bc6073df696a3","name":"@b2broker/signalr","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@b2broker/signalr","version":"1.0.0","keywords":["signalr","aspnetcore"],"author":{"name":"Microsoft"},"license":"Apache-2.0","_id":"@b2broker/signalr@1.0.0","maintainers":[{"name":"b2broker","email":"npm@b2broker.net"}],"homepage":"https://github.com/b2broker/aspnetcore/tree/npm/src/SignalR/clients/ts/signalr/#readme","bugs":{"url":"https://github.com/b2broker/aspnetcore/issues"},"umd":"./dist/browser/signalr.js","dist":{"shasum":"3c167e53c95dd4875dc1fc30803526ed7f6b6092","tarball":"https://registry.npmjs.org/@b2broker/signalr/-/signalr-1.0.0.tgz","fileCount":197,"integrity":"sha512-fWxGbgoMBHlyCuvTQIO+SY5AvVqXYo2Q3K0lJ4SG//tj6Zb/gxA6X0zMNLpP5OcTIlEcZzA75udOL/j1dj0WDQ==","signatures":[{"sig":"MEQCIDkvg1Fe7DmXKCeggQUDTDtU6kzYfrZCRE88cZM3720YAiBsMeRYELNp/TtE9Cz+DGcf1KzbPwSbism9GG0TtMoc4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2606664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh12PfCRA9TVsSAnZWagAAsIMP/RxPtWxFheleWHa88vh0\nDcn2ryC7+NTj0OzoGEFd8kP5iWnAHdyoqg52ceGub20iPEtePs8rU7qv8wSY\n9JBvcqein/GxrTW1VLID/sgz//sqdq/WLKMJw1RRCatErj7de4arHzsIHg+m\n4v0qkjpjn8sIP3NvGQkd7oINLUYUhPVLE4q1BoTTRCYavyBd6exA1dBTPZn7\n9+rNMoVlCMefUYrJhIjO18iifnEgp3lSU2k6RPIZ1rDd/OzIU2xUvOfw8cYV\nPbABqGvcmf3/0L/tbTyO+f3Lml9JbSX1njYWZuetisLyGuuMGr7RRy2pvd8I\n6i6NsJttaXkKYqDvI2+Gvx4CK115jf1yP0DGOCr1ilzwCTxAyddTLc/1EFoQ\nzL5Jl0N763sGbPm0Y1OJxQCs4qFXSawmmI03SF1WkKEdU6cOWSQnUCb/eSep\nX+ddy+LhzdXOYLQ7X3tOGgYMr/rCsLgSuxfRqXQmCk6oBsAUsG7msXBvf+MT\nOWxLWe3Un2ZjvJ/I1QQfWzuPbDVAhuFzIzjJ8lYSLEeF3s5p0kpAqqp76oli\nHxSBWaLjR7S21/2hrZWSVKAE2h8MLd6Cdbff6OsDTBLyVZyQUHViw/cbOgUR\niubrBCysz/6W6mGyCAAH/WSIeMyz8QaS07iYe4a9lWnSc0RBMSSN6v9S4xyC\n82Mt\r\n=zi6v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","scripts":{"test":"echo \"Run 'yarn test' in the 'clients/ts' folder to test this package\" && exit 1","build":"yarn run build:lint && yarn run build:esm && yarn run build:cjs && yarn run build:browser && yarn run build:webworker && yarn run build:uglify","clean":"node ../common/node_modules/rimraf/bin.js ./dist","prepack":"node ../build/embed-version.js","prebuild":"yarn run clean && yarn install --mutex network","preclean":"cd ../common && yarn install --mutex network","build:cjs":"node ../common/node_modules/typescript/bin/tsc --project ./tsconfig.json --module commonjs --outDir ./dist/cjs","build:esm":"node ../common/node_modules/typescript/bin/tsc --project ./tsconfig.json --module es2015 --outDir ./dist/esm -d && node ./build/process-dts.js","build:lint":"node ../common/node_modules/tslint/bin/tslint -c ../tslint.json -p ./tsconfig.json","build:uglify":"yarn run build:uglify:browser && yarn run build:uglify:webworker","build:browser":"node ../common/node_modules/webpack-cli/bin/cli.js","build:webworker":"node ../common/node_modules/webpack-cli/bin/cli.js --env.platform=webworker","build:uglify:browser":"node ../common/node_modules/uglify-js/bin/uglifyjs --source-map \"url='signalr.min.js.map',content='./dist/browser/signalr.js.map'\" --comments -o ./dist/browser/signalr.min.js ./dist/browser/signalr.js","build:uglify:webworker":"node ../common/node_modules/uglify-js/bin/uglifyjs --source-map \"url='signalr.min.js.map',content='./dist/webworker/signalr.js.map'\" --comments -o ./dist/webworker/signalr.min.js ./dist/webworker/signalr.js"},"typings":"./dist/esm/index.d.ts","_npmUser":{"name":"b2broker","email":"npm@b2broker.net"},"umd_name":"signalR","deprecated":"Use the official package @microsoft/signalr >=5.0.0-preview.3.20215.14","repository":{"url":"git+https://github.com/b2broker/aspnetcore.git","type":"git"},"_npmVersion":"6.13.7","description":"ASP.NET Core SignalR Client","directories":{"test":"spec"},"_nodeVersion":"13.7.0","dependencies":{"ws":"^6.0.0","request":"^2.88.0","eventsource":"^1.0.7"},"_hasShrinkwrap":false,"devDependencies":{"@types/jest":"^23.3.2","@types/node":"^10.9.4","es6-promise":"^4.2.2","@types/request":"^2.47.1","@types/eventsource":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/signalr_1.0.0_1582287070351_0.18333370427744589","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-02-21T12:11:10.310Z","modified":"2025-02-25T13:17:23.584Z","1.0.0":"2020-02-21T12:11:10.562Z"},"bugs":{"url":"https://github.com/b2broker/aspnetcore/issues"},"author":{"name":"Microsoft"},"license":"Apache-2.0","homepage":"https://github.com/b2broker/aspnetcore/tree/npm/src/SignalR/clients/ts/signalr/#readme","keywords":["signalr","aspnetcore"],"repository":{"url":"git+https://github.com/b2broker/aspnetcore.git","type":"git"},"description":"ASP.NET Core SignalR Client","maintainers":[{"email":"npm-manager@b2broker.net","name":"b2broker-manager"}],"readme":"JavaScript and TypeScript clients for SignalR for ASP.NET Core and Azure SignalR Service (forked from [`@microsoft/signalr`](https://www.npmjs.com/package/@microsoft/signalr))\n\n## Installation\n\n```bash\nnpm install @b2broker/signalr\n# or\nyarn add @b2broker/signalr\n```\n\nTo try previews of the next version, use the `next` tag on NPM:\n\n```bash\nnpm install @b2broker/signalr@next\n# or\nyarn add @b2broker/signalr@next\n```\n\n## Usage\n\nSee the [SignalR Documentation](https://docs.microsoft.com/aspnet/core/signalr) at docs.microsoft.com for documentation on the latest release. [API Reference Documentation](https://docs.microsoft.com/javascript/api/%40aspnet/signalr/?view=signalr-js-latest) is also available on docs.microsoft.com.\n\nFor documentation on using this client with Azure SignalR Service and Azure Functions, see the [SignalR Service serverless developer guide](https://docs.microsoft.com/azure/azure-signalr/signalr-concept-serverless-development-config).\n\n### Browser\n\nTo use the client in a browser, copy `*.js` files from the `dist/browser` folder to your script folder include on your page using the `<script>` tag.\n\n### WebWorker\n\nTo use the client in a webworker, copy `*.js` files from the `dist/webworker` folder to your script folder include on your webworker using the `importScripts` function. Note that webworker SignalR hub connection supports only absolute path to a SignalR hub.\n\n### Node.js\n\nTo use the client in a NodeJS application, install the package to your `node_modules` folder and use `require('@b2broker/signalr')` to load the module. The object returned by `require('@b2broker/signalr')` has the same members as the global `signalR` object (when used in a browser).\n\n### Example (Browser)\n\n```JavaScript\nlet connection = new signalR.HubConnectionBuilder()\n    .withUrl(\"/chat\")\n    .build();\n\nconnection.on(\"send\", data => {\n    console.log(data);\n});\n\nconnection.start()\n    .then(() => connection.invoke(\"send\", \"Hello\"));\n```\n\n### Example (WebWorker)\n\n\n```JavaScript\nimportScripts('signalr.js');\n\nlet connection = new signalR.HubConnectionBuilder()\n    .withUrl(\"https://example.com/signalr/chat\")\n    .build();\n\nconnection.on(\"send\", data => {\n    console.log(data);\n});\n\nconnection.start()\n    .then(() => connection.invoke(\"send\", \"Hello\"));\n\n```\n\n### Example (NodeJS)\n\n```JavaScript\nconst signalR = require(\"@b2broker/signalr\");\n\nconst headers = { \"X-API-KEY\": \"SECRET\", \"X-SIGNATURE\": \"SIGNATURE\" };\n\nlet connection = new signalR.HubConnectionBuilder()\n    .withUrl(\"/chat\", { headers })\n    .build();\n\nconnection.on(\"send\", data => {\n    console.log(data);\n});\n\nconnection.start()\n    .then(() => connection.invoke(\"send\", \"Hello\"));\n```\n","readmeFilename":"README.md"}