{"_id":"@allenzhong/sqs-producer","_rev":"2-f2d25de5ce983b923825a73f6f4211a2","name":"@allenzhong/sqs-producer","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@allenzhong/sqs-producer","version":"0.0.1","description":"Enhanced tools that enqueues messages onto a given SQS queue","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"jest --coverage","posttest":"npm run lint","lint":"eslint . --ext .ts","build":"npm run clean && tsc","prepublish":"npm run build","pretest":"npm run build","watch":"tsc --watch","clean":"rm -fr dist/*"},"engines":{"node":">=12.0.0"},"repository":{"type":"git","url":"git+https://github.com/allenzhong/sqs-producer.git"},"license":"Apache-2.0","bugs":{"url":"https://github.com/allenzhong/sqs-producer/issues"},"keywords":["aws","sqs","producer","queue"],"homepage":"https://github.com/allenzhong/sqs-producer","dependencies":{"@aws-sdk/client-sqs":"^3.82.0"},"devDependencies":{"@types/debug":"^4.1.7","@types/jest":"^27.4.1","@types/node":"^13.13.5","@typescript-eslint/eslint-plugin":"^5.21.0","@typescript-eslint/parser":"^5.21.0","aws-sdk-client-mock":"^0.6.2","eslint":"^8.14.0","eslint-config-iplayer-ts":"^4.0.0","jest":"^27.5.1","ts-jest":"^27.1.4","ts-node":"^10.7.0","typescript":"^4.6.4"},"eslintConfig":{"extends":"iplayer-ts","parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"gitHead":"0608a9878bf55a8fa13db82908a44019e745a031","_id":"@allenzhong/sqs-producer@0.0.1","_nodeVersion":"14.18.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-ki5NfkymLSMqFsiL1zmoCn1fiRy3XJwsVa3XZrmeraAIZScBMjWjMnQ8/wIryPT/Q8lum0Tz8BXRxMjj9YkKyA==","shasum":"1b9abc81811dd9bee63e09ffbd7dd4328b4fdd18","tarball":"https://registry.npmjs.org/@allenzhong/sqs-producer/-/sqs-producer-0.0.1.tgz","fileCount":26,"unpackedSize":26248,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrCbpxg93Azn1sbymiIMAmX4X9nzoob28npuR6J4HqbAIhAJikgj/wDak3AZADVYQHq6ueSwPtYsNvehPK8HgZ1DFA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicPj9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7Pw/7BbT0Of7qzTHi/1L9o9LOkzgsRhi5Q8CXsb79980xK+Wn1OWA\r\nfspPeQMiU6vq/7/tNevNH4RnNxsZYQsgQwamXTPKfZ9LMGWzfSLTEg9GwbB5\r\ngBKPt0fEmeLgJA/M34KnrxxpLpITnv2SGsoEeal/WIlPkIpLD88o9uXab6Xb\r\n/C8oh7zkMLBzXHmcLP6qpE4BnYxe0LZ1XcbDnaLiWKeoDaITDDov2XGKepJi\r\nda5K+LfvHmjh0Zb8s4sqY3tTT50l4zgbun4/Y/ZWgt2zQzHDIRb9G3Xo7M9r\r\nJpCxbdfcK7jGIr3DoCHipaVhEMv9oJAxbkYnIs4Ei2OzPy2cHfbH5IN+Cx/A\r\nquKyma3+3So9lMnCIdqh1I104Anu8Y3N8VMTLorn9gVQSMutTGQKF1DyHMov\r\nw4ohEGXivvOSzlyI8GC+Zl1xvrtiG3Gbwz7VqWED78RCJSYVRjMxcO0BK029\r\nAZl8jBuNGm6qFe3K7iK5pMpL4x/IoYTVUKIt9SJi+WmfL27X1STGCJDFVbBp\r\nTI4UWEgtxb09cSL98y/9zCoMOb5KExJ2o+gGt4VxtKTPBIacQfxs8iOz1qus\r\n08JGVPK+sR3npIETjq1g1Fi2cUVvl8QkBuxume/kAw9Lt2HEAcJ/A0ZmtlSM\r\nBiVSvCrHKoIiZIUgCu/OZfjbCYEKkv5EJYM=\r\n=Ppv0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"allenzhong","email":"zhong.allen@gmail.com"},"directories":{},"maintainers":[{"name":"allenzhong","email":"zhong.allen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sqs-producer_0.0.1_1651570941673_0.18915904641040315"},"_hasShrinkwrap":false},"0.0.2":{"name":"@allenzhong/sqs-producer","version":"0.0.2","description":"Enhanced tools that enqueues messages onto a given SQS queue","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"jest --coverage","posttest":"npm run lint","lint":"eslint . --ext .ts","build":"npm run clean && tsc","prepublish":"npm run build","pretest":"npm run build","watch":"tsc --watch","clean":"rm -fr dist/*"},"engines":{"node":">=12.0.0"},"repository":{"type":"git","url":"git+https://github.com/allenzhong/sqs-producer.git"},"license":"Apache-2.0","bugs":{"url":"https://github.com/allenzhong/sqs-producer/issues"},"keywords":["aws","sqs","producer","queue"],"homepage":"https://github.com/allenzhong/sqs-producer","dependencies":{"@aws-sdk/client-sqs":"^3.82.0"},"devDependencies":{"@types/debug":"^4.1.7","@types/jest":"^27.4.1","@types/node":"^13.13.5","@typescript-eslint/eslint-plugin":"^5.21.0","@typescript-eslint/parser":"^5.21.0","aws-sdk-client-mock":"^0.6.2","eslint":"^8.14.0","eslint-config-iplayer-ts":"^4.0.0","jest":"^27.5.1","ts-jest":"^27.1.4","ts-node":"^10.7.0","typescript":"^4.6.4"},"eslintConfig":{"extends":"iplayer-ts","parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"gitHead":"091a77cd63af4fe83f67497d7e01f4a243ad1d01","_id":"@allenzhong/sqs-producer@0.0.2","_nodeVersion":"14.18.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-H9JNaox9HeJrDFlXKG/kcYqscYkSq9az6DHrbkxmjoq2SZhqv4hmU1kI29CKJ8qPLULZKP4Obc3Ew01KmnGXWQ==","shasum":"cf8f135e39f083ed6479b272fb72804c36f8b941","tarball":"https://registry.npmjs.org/@allenzhong/sqs-producer/-/sqs-producer-0.0.2.tgz","fileCount":26,"unpackedSize":26289,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHI6xON608KUMqHjcp1uORv6RGUfqV7T0Zjmlk7p9f70AiB4NMkHoFVlxGdZN6/dMxzGL79SfhpcHBFwMR1xUUV5ng=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicQEJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQtBAAhtto4uj0pV1MXQuF83J7IXIK11RQRd8+Lkm4sLPWp7GUhjHE\r\nOhJSftY/WKpnVzLLS0/OHNdCZ/M9JMm7ZJNmaQWbqaD3LAczSQlQW6xmsAtv\r\nyDL0mpQAn/jVz5PaNTBbCTU5Bfuqaqs3CtJwJitNfxha0J+HU7ZIUSeucvRw\r\nYeHH0HXOggerG2YfEh27AwaJ/f970o1utqprBLNYI5TozwMNzJbVekZtvTuk\r\nH+zXojUnu7EbQkjbMbSHoGP75mHH1zaxS8vLRsMHZcuvi/xWR5VWud2G+gnp\r\nlBqHXwG24DJEs5OLlsIeCFU1oUiEB2Zyb32KwnRlccQVnw3h0lpVmK9RhZAt\r\nuLCL6Q1JkvOhzmza02FOMmX0DAddsc3Sd5S75r9BESxD3BpL0dVWFcWgUI07\r\ncnedGusNfhh8MXX4zKkQ3yRgCeblzB9gTLOcahvVGuqXFeWBdObCIOZVyIY1\r\nfT4iG7VZEDMCD0e/xcwqMN+wyW1fUjBg2zFKPpU/7wWbONrfnTqvJjUP01ub\r\nFNiS4jsxgunX1sDh+NDt49zHY44GFNHrssnlpnckL5aFJ+6j3WmP/nnz/IZQ\r\nCZoMCyQrh9FqopvG1WW2Bj2Uft5fx0D73DMYVY9Ta1eKZg6mKg4Ur0fc51hJ\r\nCWWc3lZRyhiFf3Qk0ApMd2ZfI5jB8jf34YA=\r\n=RUjO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"allenzhong","email":"zhong.allen@gmail.com"},"directories":{},"maintainers":[{"name":"allenzhong","email":"zhong.allen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sqs-producer_0.0.2_1651573001607_0.8990228623505123"},"_hasShrinkwrap":false},"0.0.3":{"name":"@allenzhong/sqs-producer","version":"0.0.3","description":"Enhanced tools that enqueues messages onto a given SQS queue","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"jest --coverage","posttest":"npm run lint","lint":"eslint . --ext .ts","build":"npm run clean && tsc","prepublish":"npm run build","pretest":"npm run build","watch":"tsc --watch","clean":"rm -fr dist/*"},"engines":{"node":">=12.0.0"},"repository":{"type":"git","url":"git+https://github.com/allenzhong/sqs-producer.git"},"license":"Apache-2.0","bugs":{"url":"https://github.com/allenzhong/sqs-producer/issues"},"keywords":["aws","sqs","producer","queue"],"homepage":"https://github.com/allenzhong/sqs-producer","dependencies":{"@aws-sdk/client-sqs":"^3.82.0"},"devDependencies":{"@types/debug":"^4.1.7","@types/jest":"^27.4.1","@types/node":"^13.13.5","@typescript-eslint/eslint-plugin":"^5.21.0","@typescript-eslint/parser":"^5.21.0","aws-sdk-client-mock":"^0.6.2","eslint":"^8.14.0","eslint-config-iplayer-ts":"^4.0.0","jest":"^27.5.1","ts-jest":"^27.1.4","ts-node":"^10.7.0","typescript":"^4.6.4"},"eslintConfig":{"extends":"iplayer-ts","parserOptions":{"ecmaVersion":2017,"sourceType":"module"}},"gitHead":"90bd2e54ea026b1112412f4b9193c2d097731715","_id":"@allenzhong/sqs-producer@0.0.3","_nodeVersion":"14.18.1","_npmVersion":"8.6.0","dist":{"integrity":"sha512-o6qUSNM7O5K8yfUQ3SglEANY2IWoDUFpz/dFG25ucdsk0rMpKhtnhhJ0xvQprgoDA1R2ESnp9KZtZuskUew3gw==","shasum":"fb23a61108462e854cfe0be10b2b84e30634a051","tarball":"https://registry.npmjs.org/@allenzhong/sqs-producer/-/sqs-producer-0.0.3.tgz","fileCount":26,"unpackedSize":26330,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIOG5AnMLm9CufpLWdA9I0DoTKT+sWpoUTu53OhW46oQIhAMU79z9904oFImL8dZRQ0VcWE3dgPOn6EZQd4klpyCU6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicQLfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjZg//dQS/t40rrMjeRntaM4PEcZERj/PH7vJj9w2uyp0WiaBJSFXe\r\nD3xpS7fuyH0s0Tq/Eud9kS45WBBl6duVDgnzBxS2HiN+6CD+7n1hU+BbtS23\r\nNPCK3iMUEVM51t0K4Sfw2nwWTDHzZMftaz/3x7yaKiXiGyD6A6geZT91TtBR\r\n/GdBOUTN18beOiOPJRchwYHSNITroA3xBTpbqJFP2PuPsOSMI+K0VbHr/0eg\r\nk8SQsMTUHTfStjoAsuosyJUQlAXXJbhh6tSyLf8atDUPxm6DXinD5vUVKRmN\r\nqVE8216f7BfVbx/i+ZXp+S2pGbEbwfRBAW0cLVFEQwRk9dM7dVrEJ0lR4KqO\r\nlck8uHLqrdEN5aHmQ72Zl6zDQLSzlcj0iD2XmXpboJI8Lk7LfRGDDFu0YsYp\r\n8vXb43kD4QM/FOVOd+AxnqepnffoL4+BuZ3TNol7AxvI19lGRbmybHvMwS49\r\nlCOpqYq1/gZXlJ+r5BTvaLkDqw2oyWJJjqIEnfJoPNHpugE0UtyIJKDz0CWZ\r\ns0E9uQYfrvZyYmlbn/ycY3gYmy0or7U34VQiFfsUCuepty46pQR4ebnTGc2k\r\nYzx4ejJTTCmJ15RgmNcHQjhHaOE6IK8WnLHBR0Xl77d2c5P23nzuQk0VYZ4U\r\nGJC9MO16sPecFN5mQQkeDHUVquWqptE0K1M=\r\n=S1sU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"allenzhong","email":"zhong.allen@gmail.com"},"directories":{},"maintainers":[{"name":"allenzhong","email":"zhong.allen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sqs-producer_0.0.3_1651573471487_0.9009536392069017"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-03T09:42:21.567Z","0.0.1":"2022-05-03T09:42:21.777Z","modified":"2022-05-03T10:24:31.718Z","0.0.2":"2022-05-03T10:16:41.758Z","0.0.3":"2022-05-03T10:24:31.653Z"},"maintainers":[{"name":"allenzhong","email":"zhong.allen@gmail.com"}],"description":"Enhanced tools that enqueues messages onto a given SQS queue","homepage":"https://github.com/allenzhong/sqs-producer","keywords":["aws","sqs","producer","queue"],"repository":{"type":"git","url":"git+https://github.com/allenzhong/sqs-producer.git"},"bugs":{"url":"https://github.com/allenzhong/sqs-producer/issues"},"license":"Apache-2.0","readme":"sqs-producer\n====================\n\n[![NPM downloads](https://img.shields.io/npm/dm/sqs-producer.svg?style=flat)](https://npmjs.org/package/sqs-producer)\n[![Build Status](https://travis-ci.org/allenzhong/sqs-producer.svg?branch=master)](https://travis-ci.org/allenzhong/sqs-producer?branch=master) \n\n\nEnqueues messages onto a given SQS queue\n\n## Installation\n\n```\nnpm install sqs-producer\n```\n## Usage\n\n```js\nconst { Producer } = require('sqs-producer');\n\n// create simple producer\nconst producer = Producer.create({\n  queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name',\n  region: 'eu-west-1'\n});\n\n// create custom producer (supporting all opts as per the API docs: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#constructor-property)\nconst producer = Producer.create({\n  queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name',\n  region: 'eu-west-1',\n  accessKeyId: 'yourAccessKey',\n  secretAccessKey: 'yourSecret'\n});\n\n// send messages to the queue\nawait producer.send(['msg1', 'msg2']);\n\n// get the current size of the queue\nconst size = await producer.queueSize();\nconsole.log(`There are ${size} messages on the queue.`);\n\n// send a message to the queue with a specific ID (by default the body is used as the ID)\nawait producer.send([{\n  id: 'id1',\n  body: 'Hello world'\n}]);\n\n// send a message to the queue with\n// - delaySeconds (must be an number contained within 0 and 900)\n// - messageAttributes\nawait producer.send([\n  {\n    id: 'id1',\n    body: 'Hello world with two string attributes: attr1 and attr2',\n    messageAttributes: {\n      attr1: { DataType: 'String', StringValue: 'stringValue' },\n      attr2: { DataType: 'Binary', BinaryValue: new Buffer('binaryValue') }\n    }\n  },\n  {\n    id: 'id2',\n    body: 'Hello world delayed by 5 seconds',\n    delaySeconds: 5\n  }\n]);\n\n// send a message to a FIFO queue\n//\n// note that AWS FIFO queues require two additional params:\n// - groupId (string)\n// - deduplicationId (string)\n//\n// deduplicationId can be excluded if content-based deduplication is enabled\n//\n// http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html\nawait producer.send({\n  id: \"testId\",\n  body: 'Hello world from our FIFO queue!',\n  groupId: 'group1234',\n  deduplicationId: 'abcdef123456' // typically a hash of the message body\n});\n```\n\n## Development\n\n### Test\n\n```\nnpm test\n```\n\n### Coverage\nFor coverage report, run the command:\n\n```\nnpm run coverage\n```\n\n### Lint\nTo check for problems using ESLint\n\n```\nnpm run lint\n```\n\n## Contributing\nSee [contributing guildlines](./.github/CONTRIBUTING.md)\n","readmeFilename":"README.md"}