{"_id":"@bnjns/slack-bolt-dsl","_rev":"2-b2fcdea165e0c6d7f0f13b5c84d899f8","name":"@bnjns/slack-bolt-dsl","dist-tags":{"latest":"0.1.0-alpha.1"},"versions":{"0.0.1":{"name":"@bnjns/slack-bolt-dsl","version":"0.0.1","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./blocks":{"types":"./dist/blocks/index.d.ts","default":"./dist/blocks/index.js"},"./elements":{"types":"./dist/elements/index.d.ts","default":"./dist/elements/index.js"},"./inputs":{"types":"./dist/inputs/index.d.ts","default":"./dist/inputs/index.js"},"./views":{"types":"./dist/views/index.d.ts","default":"./dist/views/index.js"}},"repository":{"type":"git","url":"git+https://github.com/bnjns/slack-bolt-js-dsl.git"},"author":{"name":"Ben Jones"},"license":"Apache-2.0","devDependencies":{"@slack/bolt":"^3.17.1","@stylistic/eslint-plugin":"^1.5.4","@types/jest":"^29.5.11","@types/node":"^20.11.8","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1","eslint":"^8.56.0","jest":"^29.7.0","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.3.3"},"peerDependencies":{"@slack/bolt":"^3.17.1"},"engines":{"node":">=18.0.0"},"scripts":{"build":"rm -rf dist && tsc","check:all":"yarn check:lint && yarn check:types && yarn test","check:lint":"eslint . --ext .ts","check:types":"tsc --noEmit","test":"jest","test:watch":"yarn test --watchAll"},"_id":"@bnjns/slack-bolt-dsl@0.0.1","gitHead":"ebcc138311754ae4831378c9d18132901c5c41c0","description":"<div align=\"center\">","bugs":{"url":"https://github.com/bnjns/slack-bolt-js-dsl/issues"},"homepage":"https://github.com/bnjns/slack-bolt-js-dsl#readme","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-4qlcK3oA++E4T2yrV7LzXW1S7PZLDqU+nztENj0x/vV4E9ie8lPdVorCPFJLEKkyZpxF6De4Zy+B5woIDWIWIA==","shasum":"daa3a5cc23b041a795445e2cb5ced13974027db2","tarball":"https://registry.npmjs.org/@bnjns/slack-bolt-dsl/-/slack-bolt-dsl-0.0.1.tgz","fileCount":143,"unpackedSize":184159,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bnjns%2fslack-bolt-dsl@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCw3QITKkJ1obtAt50EXh0uw8q9Ec7aJIdgawZeNQAW5gIhAKXjm5cK4Mla96ADkeJgwkZG/vIla9ULsbkrM8oxvyQ6"}]},"_npmUser":{"name":"bnjns","email":"ben@bnjns.uk"},"directories":{},"maintainers":[{"name":"bnjns","email":"ben@bnjns.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slack-bolt-dsl_0.0.1_1706482132867_0.5991483509540887"},"_hasShrinkwrap":false},"0.0.1-a":{"name":"@bnjns/slack-bolt-dsl","version":"0.0.1-a","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./blocks":{"types":"./dist/blocks/index.d.ts","default":"./dist/blocks/index.js"},"./elements":{"types":"./dist/elements/index.d.ts","default":"./dist/elements/index.js"},"./inputs":{"types":"./dist/inputs/index.d.ts","default":"./dist/inputs/index.js"},"./views":{"types":"./dist/views/index.d.ts","default":"./dist/views/index.js"}},"repository":{"type":"git","url":"git+https://github.com/bnjns/slack-bolt-js-dsl.git"},"author":{"name":"Ben Jones"},"license":"Apache-2.0","devDependencies":{"@slack/bolt":"^3.17.1","@stylistic/eslint-plugin":"^1.5.4","@types/jest":"^29.5.11","@types/node":"^20.11.8","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1","eslint":"^8.56.0","jest":"^29.7.0","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.3.3"},"peerDependencies":{"@slack/bolt":"^3.17.1"},"engines":{"node":">=18.0.0"},"scripts":{"build":"rm -rf dist && tsc","check:all":"yarn check:lint && yarn check:types && yarn test","check:lint":"eslint . --ext .ts","check:types":"tsc --noEmit","test":"jest","test:watch":"yarn test --watchAll"},"_id":"@bnjns/slack-bolt-dsl@0.0.1-a","gitHead":"6dac69701ae940af49316cbda02624680d8d8ec2","description":"<div align=\"center\">","bugs":{"url":"https://github.com/bnjns/slack-bolt-js-dsl/issues"},"homepage":"https://github.com/bnjns/slack-bolt-js-dsl#readme","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-F5Bf8b3ev91r9cN2F/kYzcHEXU6YsnV8VUWI0MFgG8BOG8eqdmKwB93drHkBNFYOilFnlDdG2r4CKxOyi77cUQ==","shasum":"68d92ccd5f621218dea48e34078b3e693b1eb274","tarball":"https://registry.npmjs.org/@bnjns/slack-bolt-dsl/-/slack-bolt-dsl-0.0.1-a.tgz","fileCount":143,"unpackedSize":184160,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bnjns%2fslack-bolt-dsl@0.0.1-a","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8FTGQDNH5ghHx+LUg8doT+09BnXE3U2UgpVQIeAIarAIhAIZdA9cVp7U/DkHbCjSdTYrDA/M+Bzz5lX3GcX33ZW/X"}]},"_npmUser":{"name":"bnjns","email":"ben@bnjns.uk"},"directories":{},"maintainers":[{"name":"bnjns","email":"ben@bnjns.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slack-bolt-dsl_0.0.1-a_1706482576254_0.4386367965333895"},"_hasShrinkwrap":false},"0.1.0-alpha.1":{"name":"@bnjns/slack-bolt-dsl","description":"A DSL-like package that allows you to fluently build blocks to use with Slack's Bolt JS SDK.","version":"0.1.0-alpha.1","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./blocks":{"types":"./dist/blocks/index.d.ts","default":"./dist/blocks/index.js"},"./elements":{"types":"./dist/elements/index.d.ts","default":"./dist/elements/index.js"},"./inputs":{"types":"./dist/inputs/index.d.ts","default":"./dist/inputs/index.js"},"./views":{"types":"./dist/views/index.d.ts","default":"./dist/views/index.js"}},"repository":{"type":"git","url":"git+https://github.com/bnjns/slack-bolt-js-dsl.git"},"author":{"name":"Ben Jones"},"license":"Apache-2.0","devDependencies":{"@slack/bolt":"^3.17.1","@stylistic/eslint-plugin":"^1.5.4","@types/jest":"^29.5.11","@types/node":"^20.11.8","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1","eslint":"^8.56.0","jest":"^29.7.0","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.3.3"},"peerDependencies":{"@slack/bolt":"^3.17.1"},"engines":{"node":">=18.0.0"},"scripts":{"build":"rm -rf dist && tsc","check:all":"yarn check:lint && yarn check:types && yarn test","check:lint":"eslint . --ext .ts","check:types":"tsc --noEmit","test":"jest","test:watch":"yarn test --watchAll"},"_id":"@bnjns/slack-bolt-dsl@0.1.0-alpha.1","gitHead":"29a23a6603f193e7b8ed4df0d99d8705c40bd687","bugs":{"url":"https://github.com/bnjns/slack-bolt-js-dsl/issues"},"homepage":"https://github.com/bnjns/slack-bolt-js-dsl#readme","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-olyujrxC5ybNniLAOwAYGzymfeZa8h3x/JZ0cGT/yCoUs/PLhNITatL4th4lY+4Xe7Bzhs9bnT73GBtjrGDSuQ==","shasum":"7ad696d58b0748ecb70429306df570cbb1bf6ed3","tarball":"https://registry.npmjs.org/@bnjns/slack-bolt-dsl/-/slack-bolt-dsl-0.1.0-alpha.1.tgz","fileCount":143,"unpackedSize":184280,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bnjns%2fslack-bolt-dsl@0.1.0-alpha.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYQ6nrZhu+CXFMgMgMed2l3xtlg9jxeh+i9v6kzghOgQIgd8peLcKubk+KnkDU5ABPQAxX4zUFGQ7Fob67UsNfAac="}]},"_npmUser":{"name":"bnjns","email":"ben@bnjns.uk"},"directories":{},"maintainers":[{"name":"bnjns","email":"ben@bnjns.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/slack-bolt-dsl_0.1.0-alpha.1_1706486768331_0.20216729023625368"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-28T22:48:52.749Z","0.0.1":"2024-01-28T22:48:53.016Z","modified":"2024-01-29T00:06:08.884Z","0.0.1-a":"2024-01-28T22:56:16.461Z","0.1.0-alpha.1":"2024-01-29T00:06:08.482Z"},"maintainers":[{"name":"bnjns","email":"ben@bnjns.uk"}],"description":"A DSL-like package that allows you to fluently build blocks to use with Slack's Bolt JS SDK.","homepage":"https://github.com/bnjns/slack-bolt-js-dsl#readme","repository":{"type":"git","url":"git+https://github.com/bnjns/slack-bolt-js-dsl.git"},"author":{"name":"Ben Jones"},"bugs":{"url":"https://github.com/bnjns/slack-bolt-js-dsl/issues"},"license":"Apache-2.0","readme":"<div align=\"center\">\n\n### Slack Bolt JS DSL\n\n![GitHub License](https://img.shields.io/github/license/bnjns/slack-bolt-js-dsl?style=flat-square)\n![NPM Version](https://img.shields.io/npm/v/%40bnjns%2Fslack-bolt-js-dsl?style=flat-square)\n![GitHub issues](https://img.shields.io/github/issues/bnjns/slack-bolt-js-dsl?style=flat-square)\n\n---\n\nA DSL-like package that allows you to fluently build blocks to use with Slack's Bolt JS SDK.\n</div>\n\n## 🧐 About\n\nSlack's Bolt SDK can be used to interact with a Slack workspace, and sending messages or building views uses their Block\nKit. To build blocks, elements, inputs and views you just create a raw Javascript object, however coming from other\nlanguages this does not provide the most user-friendly experience, especially if you enforce camel-casing via ESLint.\n\nThis package uses the builder pattern to allow you to build blocks and views in a more fluent manner:\n\n```typescript\nimport { KnownBlock } from '@slack/bolt'\nimport { blocks } from '@bnjns/slack-bolt-dsl'\nimport { mrkdwnText } from '@bnjns/slack-bolt-dsl/elements'\nimport { Button } from '@bnjns/slack-bolt-dsl/inputs'\n\nconst blocks: KnownBlock[] = blocks(blocks =>\n  blocks\n    .header(header => header.text('This is the header'))\n    .divider()\n    .section(section =>\n      section\n        .text(mrkdwnText('Some *markdown* text'))\n        .accessory(Button, button => \n          button\n            .text('Ok')\n            .value('confirmed')\n            .style('primary')\n        )\n    )\n)\n```\n\n## 🎈 Usage\n\nTODO.\n\n## 🏁 Contributing\n\n### Prerequisites\n\n- Node.js (18.x or later)\n- Yarn 1.x\n\n### Installing\n\nSimply clone this repo to your desired location:\n\n```sh\ngit clone git@github.com:bnjns/slack-bolt-js-dsl.git\n```\n\nInstall the dependencies:\n\n```sh\nyarn install\n```\n\n### Running the tests\n\nTo run the unit tests:\n\n```sh\nyarn test\n```\n\nAlternatively you can watch for changes (and automatically re-run tests) with:\n\n```sh\nyarn test:watch\n```\n\n## ⛏️ Built Using\n\n- [ESLint](https://eslint.org/)\n- [Jest](https://jestjs.io/)\n- [Slack Bolt JS SDK](https://github.com/slackapi/bolt-js)\n- [Typescript](https://www.typescriptlang.org/)\n\n## ✍️ Authors\n\n- [@bnjns](https://github.com/bnjns)\n","readmeFilename":"readme.md"}