{"_id":"@bakerstreet-industries/bus-postgres","_rev":"1-6d138a260e1ccf3bf684aca0ab65ff21","name":"@bakerstreet-industries/bus-postgres","dist-tags":{"latest":"1.0.12"},"versions":{"1.0.12":{"name":"@bakerstreet-industries/bus-postgres","description":"A Postgres persistence adapter for workflow storage in @node-ts/bus-workflow.","version":"1.0.12","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/bakerstreet-industries/bus.git"},"scripts":{"clean":"rm -rf dist","build":"tsc --project tsconfig.json --declaration","build:watch":"yarn run build --incremental --watch --preserveWatchOutput","lint":"tslint --project tsconfig.json 'src/**/*.ts'","lint:fix":"yarn lint --fix"},"publishConfig":{"access":"public"},"dependencies":{"@node-ts/bus-messages":"^1.0.4","pg":"^8.2.1","tslib":"^1.9.3","uuid":"^3.3.2"},"devDependencies":{"@node-ts/bus-core":"^1.0.12","@node-ts/code-standards":"^0.0.10","@types/amqplib":"^0.5.11","@types/pg":"^7.14.3","@types/uuid":"^3.4.4","reflect-metadata":"^0.1.13","typemoq":"^2.1.0","typescript":"^4.3.5"},"peerDependencies":{"@node-ts/bus-core":"^1.0.0-alpha.0"},"keywords":["esb","postgres","typescript","enterprise integration patterns","bus","messaging","microservices","distributed systems","framework","enterprise framework","CQRS","ES","NServiceBus","Mule ESB"],"gitHead":"22878835e97f47c5d0cb2aac8b222a0765e1e8fc","bugs":{"url":"https://github.com/bakerstreet-industries/bus/issues"},"homepage":"https://github.com/bakerstreet-industries/bus#readme","_id":"@bakerstreet-industries/bus-postgres@1.0.12","_nodeVersion":"14.18.1","_npmVersion":"lerna/4.0.0/node@v14.18.1+arm64 (darwin)","dist":{"integrity":"sha512-RstXYVFpX1Ut91PFTrWn2hlZNW6NlVzI/A09Gztx3s7eAurSttGsnsRkiQ3nHrFrz09ETM5pvYbq7TxCsZOCMw==","shasum":"2aa53951a7f23a04a1c3a4150a6e18d32774818e","tarball":"https://registry.npmjs.org/@bakerstreet-industries/bus-postgres/-/bus-postgres-1.0.12.tgz","fileCount":32,"unpackedSize":40654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiB+9iCRA9TVsSAnZWagAAYdwQAJj962gvFgI7/7ep4Z8G\n4zeMIZUsh+rDMW6YNt9ahgjs0fQM5xoMT7eOXzm8KXJmeDf1Wivn9PNLa8s2\nrQ1emXB1VFFQH9pcnphM3sf4RuMhlzFB2fLoygYE783N+Sqgk18fFsDYQoT/\ng5eIV7KEdfZOt+VlQ6WGMbey5rvT8dS9qNsjWpKFfvsSgJs+E1EAZr7AEPSW\nTIcEaN8TQmDKPdhUTm78a/g8Nrxnm0dlnQcTDpE9vFvIyCS1wrhveD6dM2gF\nkwaHHIvN0o14oCHJiQPakzqH1h9vqk3F7uXlDsBjo4NSmTlzaou1GYjke7ZT\nqXsQL+cZkqUB1nJzI5RbBVju+6TUVGbw+P0xwIkYY/TPwiVDhWk+59TZiNmc\nomsbJCsX2QNFdTFItvaKgoa7unO/uRqxuTu5J946oJu3AxGwfJCWM+sm87cw\nEbRceLYeih9oWXMkLANuuMAdAtqujCxKatOujrkIbNqi1Fs4u+Be8/zNAQy6\nfToZ8mvTk/hsRZHV24rergj6owmOAUasJ4ljQJGsm1tKbT68bIOSwHAA0gCt\nK1Uev1Qm5RoYODImi2ouT8jj/py9EBUtGVsTIBEnUcuwP/WBFMCkzJajEWk/\nxGE1fnFDJsVmieZPoFH+mVEXrZItr4Aqp/OQGLFfG1NpV5vADDKVtROHyeX6\nshW1\r\n=iJky\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA55auLVmKZr6DnEbi0lQsQXTJHseu2VIcuxVtceJzgVAiEAp0AN5+v/cBI39omI6vTeaKbgK2iJ0C1fPEKF6dJTUgg="}]},"_npmUser":{"name":"roustalski","email":"russ@bakerstreet.industries"},"directories":{},"maintainers":[{"name":"roustalski","email":"russ@bakerstreet.industries"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bus-postgres_1.0.12_1644687202578_0.4844671123776645"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-12T17:33:22.513Z","1.0.12":"2022-02-12T17:33:22.796Z","modified":"2022-04-04T17:32:07.524Z"},"maintainers":[{"name":"roustalski","email":"russ@bakerstreet.industries"}],"description":"A Postgres persistence adapter for workflow storage in @node-ts/bus-workflow.","homepage":"https://github.com/bakerstreet-industries/bus#readme","keywords":["esb","postgres","typescript","enterprise integration patterns","bus","messaging","microservices","distributed systems","framework","enterprise framework","CQRS","ES","NServiceBus","Mule ESB"],"repository":{"type":"git","url":"git+https://github.com/bakerstreet-industries/bus.git"},"bugs":{"url":"https://github.com/bakerstreet-industries/bus/issues"},"license":"MIT","readme":"# @node-ts/bus-postgres\n\nA Postgres based persistence for workflow storage in [@node-ts/bus](https://bus.node-ts.com)\n\n🔥 View our docs at [https://bus.node-ts.com](https://bus.node-ts.com) 🔥\n\n🤔 Have a question? [Join our Discord](https://discord.gg/Gg7v4xt82X) 🤔\n\n## Installation\n\nInstall all packages and their dependencies\n\n```bash\nnpm install @node-ts/bus-postgres\n```\n\nConfigure a new Postgres persistence and register it with `Bus`:\n\n```typescript\nimport { Bus } from '@node-ts/bus-core'\nimport { PostgresPersistence, PostgresConfiguration } from '@node-ts/bus-postgres'\n\nconst configuration: PostgresConfiguration = {\n  connection: {\n    connectionString: 'postgres://postgres:password@localhost:5432/postgres'\n  },\n  schemaName: 'workflows'\n}\nconst postgresPersistence = new PostgresPersistence(configuration)\n\n// Configure bus to use postgres as a persistence\nconst run = async () => {\n  await Bus\n    .configure()\n    .withPersistence(postgresPersistence)\n    .initialize()\n}\nrun.then(() => void)\n```\n\n## Configuration Options\n\nThe Postgres persistence has the following configuration:\n\n*  **connection** *(required)* Connection pool settings for the application to connect to the postgres instance\n*  **schemaName** *(required)* The schema name to create workflow tables under. This can be the 'public' default from postgres, but it's recommended to use 'workflows' or something similar to group all workflow concerns in the one place. This schema will be created if it doesn't already exist.\n\n## Development\n\nLocal development can be done with the aid of docker to run the required infrastructure. To do so, run:\n\n```bash\ndocker run --name bus-postgres -e POSTGRES_PASSWORD=password -p 6432:5432 -d postgres\n```\n","readmeFilename":"README.md"}