{"_id":"@animando/stompjs-redux-saga","_rev":"4-a7044a2a40d81da6d2c73693809762f8","name":"@animando/stompjs-redux-saga","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@animando/stompjs-redux-saga","version":"1.0.0","description":"Turns a callback into a redux saga","main":"build/index.js","types":"build/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","clean:ts":"rm -rf build","clean":"npm run clean:ts","build":"npm run clean && npm run build:ts","build:ts":"tsc -p ."},"keywords":[],"author":{"name":"Graham King"},"license":"MIT","dependencies":{"@animando/redux-saga-callback":"^1.0.1","@stomp/stompjs":"^5.4.3","redux-actions":"^2.6.5","redux-saga":"^1.1.3","sockjs-client":"^1.4.0"},"peerDependencies":{},"devDependencies":{"@types/redux-actions":"^2.6.1","@types/sockjs-client":"^1.1.1"},"gitHead":"7dbff6028512bd1b44d0e6735ec8373276aa8c49","_id":"@animando/stompjs-redux-saga@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"animando","email":"animandosolutions@gmail.com"},"dist":{"integrity":"sha512-1ZhzHf+lw2E6+wqTZ1hbzfsW0gAFqOzYNJRt9sVh/1kT4wEpY95mqSBhLJDZAzcgs4GOPK8SYxoxTOA4FpK43w==","shasum":"ed58db6edccc37b24af453ed65543b4a47ff5090","tarball":"https://registry.npmjs.org/@animando/stompjs-redux-saga/-/stompjs-redux-saga-1.0.0.tgz","fileCount":5,"unpackedSize":20205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeW305CRA9TVsSAnZWagAAVLkP/i8VbZGSkmMoBCNHW8/6\nSJrDgyANy2I6wdIU/YifOwyW1AmR4P0cQRP2hikXFzhKHJ+C6roea0u0+5e4\n/Pj3m2hcDU+KU/Wj2wcpXpfV+AkdjX7moiR7HuDYbwqEqt1L/42fjJbxvaUe\nMiJ3zT8ijtuY9V7hB1ZUsDVd8NdhwYJW8XpHNR3xh0EJk4agCgwI3mKWBZq0\n2xSUIzmc7wzEqM2z+en/aFgUDBUKC72bEeJk8rdMhi/LGlMhE6owsqEfZDgS\ntm30QawuZx+wlueLIPdpg/oUpsGJJhmHWysop4+4pkt7tkH4gxYM3gE4Z4XD\ndN8PnHpx6S2P4c90Rsrn/ez8+xUUJFXOiBDORe3fG3F4OPrD+YudPvbtLAv9\nfERQN0EzuVlAbpIk0mGKQOEO/QK5NmkQ3m3iHUdaNyQhYAjUj3+hVMuWVEk1\nBSyriNEcnnRbKT5SOU0gLLLzfp9oSgfXNunbJp63feLO2RCikbz/4F4P6+lH\nsw0S1fGACqCjefch1NzTJ7lDZK1qdsk+nb3CxuRVsLbB4JCvkcZGnqvuHEHl\nEEwpXuuW310ICrg7IqFJKt3PyaKp74IkGemNccBEPY0C/UTs6BkIOjoCqfGK\nMzBK/4v+jtpIJMBIIHGrlQaNVgtAhOpEaL6bl3bn3ngs3twjo36klmUxm8Eg\npEe1\r\n=R+1/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpcsPZOUr5WV27PErI9+tihHcufAlxQhDmUnrqdRByLQIgOS41EKy6iTlOVPssDnJx/MgFbnNoho4PyffbZwyMt7w="}]},"maintainers":[{"name":"animando","email":"animandosolutions@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stompjs-redux-saga_1.0.0_1583054137290_0.28073205895038167"},"_hasShrinkwrap":false},"1.0.1":{"name":"@animando/stompjs-redux-saga","version":"1.0.1","description":"Turns a callback into a redux saga","main":"build/index.js","types":"build/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","clean:ts":"rm -rf build","clean":"npm run clean:ts","build":"npm run clean && npm run build:ts","build:ts":"tsc -p ."},"keywords":[],"author":{"name":"Graham King"},"license":"MIT","dependencies":{"@animando/redux-saga-callback":"^1.0.5","@stomp/stompjs":"^5.4.3","redux-actions":"^2.6.5","redux-saga":"^1.1.3","sockjs-client":"^1.4.0"},"peerDependencies":{},"devDependencies":{"@types/redux-actions":"^2.6.1","@types/sockjs-client":"^1.1.1"},"gitHead":"e693722f99b9197edbe2af00cdd9d36a77acea0c","_id":"@animando/stompjs-redux-saga@1.0.1","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"animando","email":"animandosolutions@gmail.com"},"dist":{"integrity":"sha512-1OL+KRk/uVkDuq5pygEXVrbOu3c6OTXLOiWNe3LPEyONiUH3qXGjZh0h0Tmlm7Ti8pxDgi211n83iPPfwayuYA==","shasum":"de2b2ab8e49bfafbbc5b3a9855e2c3a0436f4a37","tarball":"https://registry.npmjs.org/@animando/stompjs-redux-saga/-/stompjs-redux-saga-1.0.1.tgz","fileCount":6,"unpackedSize":33011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXSbcCRA9TVsSAnZWagAA44wQAJDTstWaJNyPd3MwjC0A\n0iW3WKCgi7HdMz55L1OjIQnQHVVhW0KKH4oFCaEVQNgNo4Z9j64BcFcaMjYa\nfko1I8DYuVXH0rvEZaRl98JcjDJbVT2BkywhU6IjEMkEfs3QRF7JI2sJQce4\nKr7w6xQActnH+DkX/1SFN5WJXyGpDZBAvFH33tvmDI3NsTL7WAQpBtUuH1/Q\nRcXj9Wb5AnsPHchA5uCaL8lu4r9GSL20PSCreciqMu0IiqaS931jwlL4Xhw1\nipIyNh7T7HydjUuziEJlrh8r7W4z/HgRwW/c5JjrazlWuYHeBruoBMqy28rZ\npB+164/xT1DtshK2J1fM6owZm645gDMJKsPCrx7nPy1XkL8PzoZMKBHKDiUQ\nbuYsXTmiKZYKRhWg8ILeEsgKn8K7X2wI89qSlJWOlUcNcAf2ZWIfV+GDR+jl\ngncpb0jgIWCVBZC25eENllRPpKK4GFcT67hzf+sFrDiNL3Qy8uIP6B8z3WZm\nQxJH7nqbmCgdq1o+xzISz04QD6XFzHWP79A5Gpb/AD244P9LC58LLTi5AAnJ\n5UzzbDJj5kvdsYFOysn8r4a/z68FNuGODvO3eDnft3SMpXe13Ir2DeAPZ8/l\npVlsNOX9Tokk08MAkflKOpvO2EsXhJvOFaLSYMVZJuLYozzjB/hUxqQsRGRH\nB3to\r\n=07nr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIJoTurh/Qiss0g725fq6b5NMvf52A1IfVlUpgamlJtgIgThyThgj/NkpfRQuuFUkLGbko7oxR6Tr3aw8BLHOZS+0="}]},"maintainers":[{"name":"animando","email":"animandosolutions@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stompjs-redux-saga_1.0.1_1583163099614_0.5966161850785301"},"_hasShrinkwrap":false},"1.0.2":{"name":"@animando/stompjs-redux-saga","version":"1.0.2","description":"Turns a callback into a redux saga","main":"build/index.js","types":"build/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","clean:ts":"rm -rf build","clean":"npm run clean:ts","build":"npm run clean && npm run build:ts","build:ts":"tsc -p ."},"keywords":[],"author":{"name":"Graham King"},"license":"MIT","dependencies":{"@animando/redux-saga-callback":"^1.0.5","@stomp/stompjs":"^5.4.3","redux-actions":"^2.6.5","redux-saga":"^1.1.3","sockjs-client":"^1.4.0"},"peerDependencies":{},"devDependencies":{"@types/redux-actions":"^2.6.1","@types/sockjs-client":"^1.1.1"},"gitHead":"21fb27374502ba8096d2dfd9c037712a1685d790","_id":"@animando/stompjs-redux-saga@1.0.2","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"animando","email":"animandosolutions@gmail.com"},"dist":{"integrity":"sha512-32osPmYip2zU/7X/u8iP9ZqjSFI2OsK8OE7N/0tyNS1rPviLSYU/aBm8sTIsmGK0/7tOBSEafM/v0udcpSM7tw==","shasum":"69bb21864a899b67984b0215436096e2ee74180f","tarball":"https://registry.npmjs.org/@animando/stompjs-redux-saga/-/stompjs-redux-saga-1.0.2.tgz","fileCount":7,"unpackedSize":34554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXT/7CRA9TVsSAnZWagAA2PEP/2BYx4+k+hXGwGRIgCjE\nP5c9NeZl+g5hb8f3B4AnB1v3txW53g1/p5e/5KItzXKhMMVxbHzwYTZbV8IS\n4h6T03AWWfNqaueKEOJSVQjey2rlWY2602sMUo6DGW+d0jLc+rp0Zs1/izsl\ny3dz0tLw57cvOig0rHDQF7lbuAkwbvXyfm4MwmrajS04BqlEekpJVxWU2M0b\nfOoxcjWmyzXyekdGZ+UWr9Jrk3tD/0ZE/tyO4+mtD8Zvm5N+PzPBPls+PUns\nPD3QtBhRRrqJonx1aAMiaShEyaS9fvgyG44wFN6jOMZYvOK08JLmwbJr73w2\n8qSFDVbce0gGf0+alH8c6nbgv8KfBA/6sdyt6g+aS/TlLeKxUnyvACfTQSV5\nrWxlzxn1GwIWy6acAkfY+4ZtmCtR8MDVZCxU2egG/JJMQa1gK5hJVESqfs8X\nPpQueZWholBtnCyXhC/8OdXvqaK9jL7rV2D95ZZpLjwyj1/MhDh0ts62q7qH\nYtkI6VmFYTEIte410IQJ6wjYXmJsfd7J3Iwtcu9REYRa9arw4rFOihIy4Ay3\nLSu2Jev5Xcoox/uLMZ/WADkGG013r8utxmMfNDcWMaP/QBJ5XUyuMZ1WyJp/\nVfllJd/2KULMo2C/o8uks8yevx4nY6KjLJPsk8GFim9p7kHWCsrUOuazQrmt\n/qYp\r\n=Scpg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1O3T+wkK01xJziHiRwzmCvugO6A5+YASnprP65A4gbAiEAkpRn7nGjcth2jWrR3/YY8SmD7Ar6VL+iJ8J7VfmqOpI="}]},"maintainers":[{"name":"animando","email":"animandosolutions@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stompjs-redux-saga_1.0.2_1583169524040_0.9623370287990223"},"_hasShrinkwrap":false},"1.0.3":{"name":"@animando/stompjs-redux-saga","version":"1.0.3","description":"Create redux saga for handling stompjs message publishing and subscriptions","repository":{"type":"git","url":"git+ssh://git@github.com/gking2224/stompjs-redux-saga.git"},"main":"build/index.js","types":"build/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","clean:ts":"rm -rf build","clean":"npm run clean:ts","build":"npm run clean && npm run build:ts","build:ts":"tsc -p ."},"keywords":[],"author":{"name":"Graham King"},"license":"MIT","dependencies":{"@animando/redux-saga-callback":"^1.0.5","@stomp/stompjs":"^5.4.3","redux-actions":"^2.6.5","redux-saga":"^1.1.3","sockjs-client":"^1.4.0"},"peerDependencies":{},"devDependencies":{"@types/redux-actions":"^2.6.1","@types/sockjs-client":"^1.1.1"},"gitHead":"b142749e53975bfe5771c2d636fc1fbee2e28482","bugs":{"url":"https://github.com/gking2224/stompjs-redux-saga/issues"},"homepage":"https://github.com/gking2224/stompjs-redux-saga#readme","_id":"@animando/stompjs-redux-saga@1.0.3","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"animando","email":"animandosolutions@gmail.com"},"dist":{"integrity":"sha512-NC7kQLBR23XbMV8OwQJ/on7i256WZhAo5F/3AoMZqGH/ju8RSpw55q0tFOtRqfwFXsXQBmACOGFILC3yUX2xug==","shasum":"560422d0bca126e76b9e0325d197e89258452105","tarball":"https://registry.npmjs.org/@animando/stompjs-redux-saga/-/stompjs-redux-saga-1.0.3.tgz","fileCount":7,"unpackedSize":34662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXUCkCRA9TVsSAnZWagAA3QUP/3eXhrgp/DZssowzxwIu\n0zWFITmlNrCGNKw0uKTSmAabLUfVeVmqbxN/5MS0MwPZDhIKddOY7dr5Vuh8\nR1AgR21KOR9edikXMEG5CXU0EVjx4uVpmhphlyUUkbL5V2sFcFhhr/EiaQpf\nwu2P4JM5dCN1RFr4j7MV8NukDtS6y499uz7IWdf1zf/vdl02KtAfYDqM9fTu\ngf+d1x/T/lIj92CBoGjaTjLsbpuvjIfrY760BggEZXTY3MTO05gXW+/EU2kg\nhczMv/OcF5slP4wwJ0cK/rnPnXcqvNGgFkQJOMIELBCewSFie/VtKi7ZvsjK\nUBO3Nl/v0z0+FL1v1yhrplvZNtfbhYO5xJQkwx0uN9tyJk17QDhOhse56e+V\ngscfq+VonCpyL3Dex56J6VvuTLW42bIEzyPJp1oqAF9i3qPECYppF2yTPb/n\nsF7IMuQa3tRY9bfOA749ZiT9GgDwGVtnZgQXMu3lYofHEsaAnDUPWYCTk751\nrF7dqu9ZjkIZgx+xqGvllCzvu6HdBHIFWa5ETosPgPGJdKQPad2qvnXJCT/J\nXVgodXbeIgbiYoXNg2tb1f2TNc4Wz2SzsZeCUqvPnIaQdT8I1fUbfly2wVyR\nZQ3i+ex9xkWws6JCwHpDcnHHGDl32JKHLuh1PjVf6oG3rlA1qngbh0yZV+L1\nG+3/\r\n=RoFJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX0zhzbY5jbJER4ZVCKdrTnpsWB8fNm3pp7RgNZ3FaFAIhAPwLrG/MZ7i9SMtl8jIM4RSrQJT/7k3YVQQSdmgcUjUi"}]},"maintainers":[{"name":"animando","email":"animandosolutions@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stompjs-redux-saga_1.0.3_1583169699539_0.5476792211158776"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-01T09:15:37.258Z","1.0.0":"2020-03-01T09:15:37.698Z","modified":"2022-04-04T14:11:21.227Z","1.0.1":"2020-03-02T15:31:39.766Z","1.0.2":"2020-03-02T17:18:51.511Z","1.0.3":"2020-03-02T17:21:39.732Z"},"maintainers":[{"name":"animando","email":"animandosolutions@gmail.com"}],"description":"Create redux saga for handling stompjs message publishing and subscriptions","keywords":[],"author":{"name":"Graham King"},"license":"MIT","readme":"# stompjs-redux-saga\n\nThis library makes it easy to configure stompjs client connection integrated with redux saga.\n\nUnder the hood it uses lower-level callback/saga integration library [@animando/redux-saga-callback](https://www.npmjs.com/package/@animando/redux-saga-callback).\n\n## Usage\n\nDefine your api and associated routines (see [redux-saga-routines](https://www.npmjs.com/package/redux-saga-routines)):\n\n```\nexport const publishRoutine = createRoutine('PUBLISH_SOMETHING');\nexport const incomingMessageRoutine = createRoutine('INCOMING_MESSAGE');\n\nexport const subscriptions = [\n  {\n    path: '/topic/incoming',\n    routine: incomingMessageRoutine,\n    convertPayload: (body) => JSON.parse(body),\n  },\n];\n\nexport const testPublishDefinitions = [\n  {\n    path: '/app/publish_something',\n    routine: publishRoutine,\n  },\n];\n```\n\nFinally, provide details of your websocket endpoint, and run the saga:\n\n```\nimport { createWsApiSaga } from '@animando/stompjs-redux-saga';\nconst stompConnectionConfig = {\n  sockJsEndpoint: <endpoint>,\n}\n\nconst wsSaga = createWsApiSaga(stompConnectionConfig, stompApiDefinition)\n\nfunction* rootSaga() {\n  yield fork(wsSaga);\n}\n```\n\nNow you just dispatch publish actions:\n```\npublishRoutine.trigger('my payload');\n```\n\nand handle incoming subscription notifications as actions in your reducer like normal:\n\n```\nconst reducer = (state = {}, {type, payload}) => {\n  switch (type) {\n    case: incomingMessageRoutine.SUCCESS:\n      return {\n        ...state,\n        incomingMessage: payload,\n      }\n\n  }\n}\n```\n","readmeFilename":"README.md","homepage":"https://github.com/gking2224/stompjs-redux-saga#readme","repository":{"type":"git","url":"git+ssh://git@github.com/gking2224/stompjs-redux-saga.git"},"bugs":{"url":"https://github.com/gking2224/stompjs-redux-saga/issues"}}