{"_id":"5ug-signlar","_rev":"1-40711b972144119da29bd858875b53e1","name":"5ug-signlar","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"5ug-signlar","version":"0.1.0","private":false,"description":"ASP.NET Core SignalR Client","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","typings":"./dist/esm/index.d.ts","umd":"./dist/browser/signalr.js","umd_name":"signalR","unpkg":"./dist/browser/signalr.js","directories":{"test":"spec"},"scripts":{"preclean":"cd ../common && yarn install --mutex network","clean":"node ../common/node_modules/rimraf/bin.js ./dist","prebuild":"npm run clean && yarn install --mutex network","build":"npm run build:lint && npm run build:esm && npm run build:cjs && npm run build:browser && npm run build:webworker && npm run build:uglify","build:lint":"node ../common/node_modules/tslint/bin/tslint -c ../tslint.json -p ./tsconfig.json","build:esm":"node ../common/node_modules/typescript/bin/tsc --project ./tsconfig.json --module es2015 --outDir ./dist/esm -d && node ./build/process-dts.js","build:cjs":"node ../common/node_modules/typescript/bin/tsc --project ./tsconfig.json --module commonjs --outDir ./dist/cjs","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":"npm run build:uglify:browser && yarn run build:uglify: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","test":"echo \"Run 'yarn test' in the 'clients/ts' folder to test this package\" && exit 1"},"keywords":["signalr","aspnetcore","uni-app"],"repository":{"type":"git","url":"git+https://github.com/lemon-go/signalr-uni.git"},"author":{"name":"Fred Yuan"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dotnet/aspnetcore/issues"},"homepage":"https://github.com/lemon-go/signalr-uni/tree/main/signalr#readme","devDependencies":{"@types/eventsource":"^1.0.2","@types/jest":"^23.3.2","@types/node":"^10.9.4","@types/tough-cookie":"^2.3.6","es6-promise":"^4.2.2","@dcloudio/types":"^2.2.2"},"dependencies":{"abort-controller":"^3.0.0","eventsource":"^1.0.7","fetch-cookie":"^0.7.3","node-fetch":"^2.6.0","ws":"^6.0.0","yarn":"^1.22.17"},"_id":"5ug-signlar@0.1.0","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-4M27bfC0GS+Lc2SGOG/4PitRdGOUkCw1ufq1724a3J3stU1zQsUy8CDWvabWDuMPv/i9sHbbLi5lLrqxDgdm5g==","shasum":"f1d7a70b70709600db5fcfdb7970d8686a5e4364","tarball":"https://registry.npmjs.org/5ug-signlar/-/5ug-signlar-0.1.0.tgz","fileCount":197,"unpackedSize":2805507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3ig0CRA9TVsSAnZWagAARUUP+wTPvgOG42dVuncKXpDX\n3BGdG81eCsMhBlRrg3pS4zFIOKnNcDNGmUZ9sEpMkB1igXJ6HwT4ZRG+cONW\nU+ivobNGHip8lN0RtNtLGOb7bf6Z/8OeTPd328hOnQk9nNflOFMIn/jqs7DJ\nKHr1a26SaXBdNgxw6TsoElxoswicxpXVYy7tm0hy4RVBoadOFPwwC7K0FYtb\nz23z6ve5BZ52kFucX9P4tC5Z3Wea9bKAR3nJCafbuv/t/P1qsvCeL+aE8iUR\n5hgdZW+2U/CbcYnnV7QRawtITN9niZV3axKOtH4ploGg7JqSweHpUAoXdUJc\nZwxByzE/7pCpc90o+3rTTDnvtidKWrAkbKZoUkgNEbbgT1lh/huKCFp0mUMp\nZEkLxDwYDdGLu9MTsWyvfYVReJv2pEsMiA6edN9rXTl+TvcfyRR8fgymWRY+\nsVm9QQGzRk2KE+H/g6pgbzHgNWJnAxKRM93EkDvmuFvCHIBTTlxVuXwxRBK+\n/7jnqXemThFBz9JlvRkrsLXnOs0U8V+eFfSkyFwIpimPq9w5c3L0lEQDlfbW\nItyGjVD1QSKxNdgNKy7xsBbeiAvr3/QyU/xiDhVGrM2CfIeapGOHTWwS6aKp\n2+M69M3y+kAt+CrxvF3Lff1ZDxDztCXgjNSAVaauBK8+W9c49Q/YKEqgyIoY\n0sJE\r\n=8grd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFAuHdSc0A/BmIItCyrNQxB+bB6vauiZHgnCvqn0aqi0AiEAtGhXq8SGESFRhQ/2AkCd8+83HwBqOar9pz31271EikQ="}]},"_npmUser":{"name":"sampsong","email":"2839018@qq.com"},"maintainers":[{"name":"sampsong","email":"2839018@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/5ug-signlar_0.1.0_1641949236422_0.18778105637795828"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-12T01:00:36.421Z","0.1.0":"2022-01-12T01:00:36.717Z","modified":"2022-04-04T10:23:25.770Z"},"maintainers":[{"name":"sampsong","email":"2839018@qq.com"}],"description":"ASP.NET Core SignalR Client","homepage":"https://github.com/lemon-go/signalr-uni/tree/main/signalr#readme","keywords":["signalr","aspnetcore","uni-app"],"repository":{"type":"git","url":"git+https://github.com/lemon-go/signalr-uni.git"},"author":{"name":"Fred Yuan"},"bugs":{"url":"https://github.com/dotnet/aspnetcore/issues"},"license":"Apache-2.0","readme":"JavaScript and TypeScript clients(compatible with [DCloud/uni-app](https://uniapp.dcloud.io/) platform) for SignalR for ASP.NET Core and Azure SignalR Service.\n\n## Installation\n\n```bash\nnpm install signalr-uni\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### UniApp\n\nTo use the client in a uni application, install the package to your `node_modules` folder and use `import { /*MODULE NAME*/ } from 'signalr-uni'` to load the module.\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('@microsoft/signalr')` to load the module. The object returned by `require('@microsoft/signalr')` has the same members as the global `signalR` object (when used in a browser).\n\n### Example (UniApp)\n\n```javascript\nimport { HubConnectionBuilder, LogLevel } from 'signalr-uni';\n\nconst connection = new HubConnectionBuilder()\n    .withUrl(\"https://example.com/signalr/chat\")\n    .withAutomaticReconnect([0, 2000, 4000, 8000, 10000, 30000, 60000])\n    .configureLogging(LogLevel.Debug)\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 (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```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\n// Use `@microsoft/signalr` instead of `signalr-uni` in a NodeJS application.\nconst signalR = require(\"@microsoft/signalr\");\n\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","readmeFilename":"README.md"}