{"_id":"@atomist/sdm-pack-event-relay","_rev":"55-db73800acd55d8923ace135fb385da0e","name":"@atomist/sdm-pack-event-relay","dist-tags":{"branch-master":"0.0.1-master.20210108051801","latest":"0.0.1-master.20190830205058","next":"0.0.1-master.20210108051801"},"versions":{"0.0.1-master.20190830205058":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20190830205058","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"aa1ab88e4c91e8e6da4ba417fe926b2e02108db8","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20190830205058","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-zh+pQdgGBWhkJbkau9qlgMBRlq9Q7etlO2qCm2+UoOOOtIvfFXblChzY52Y//Dp/lQwfPo62PPYdNN4kSAmkag==","shasum":"a332357a22e53f4d81eddd19a73ab0a581b35450","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20190830205058.tgz","fileCount":26,"unpackedSize":175270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYzJCRA9TVsSAnZWagAAESYP/36Jlsjl99lUgMurOkBO\neHk22uIfStxmFBwiUxtGISJcunjiB5yYo98vOnQIIz05rmPOF4QlXZallCq7\nQYwe1V4NMajXWLxrNaTfQu5iR24YfHWWYQYTYEal7EFt85UpK3/yD7p3biOl\nahH3g7F6hTIZTJZRj8c4cvDXm02jPLQXKrGTwqcc8dQvB02Y3H+cttEWWFjL\nWCH8qqLictqwNLFe35nToaqMjFtvwpSE5YnsCU9kxkufIOgHmGg+EeNebyXA\n3Y6qTwDc1d4myNqugwGzXIqkFeVmUfSkSW6WVxGXRoA/KnRJ5ykMleo8qlwc\n+0aWL8gjb8zxNqhb5/RKP5Ajt0EfgkdIFn8JfbAnSkDvZdeLoYW0LUlFb3Vf\nucw9MAYQL6QX63a3dsw+zC42ny2qq4X081nClCCiY78wx9jtvrAeyZFPy4cu\nAbXFP3TpI86L6+9SJPBqZb9l0UZi2HCcLY+ggfCQDMSjmBmd/cdkB9kquFUy\n6xODjYXDLcfdEo47JD9/BW0XrqJV97ucbwi21m22s/1j94k5eR/0YQrOKNIf\nO3J+FLVizztfpZ7QXO5slbPq8X49pSe6Iuy8YDk8kaL/wiXf386fZHa0jk4E\n0SEVW4ofFgpxA9zDkHYNIOgfJ3r99/5GN3SEqsch1OPqjyfU3bHPmZ7BShsf\ndiKZ\r\n=9LEt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDteTxvyMLuk5/NwVhkcZHcxrIyrebjpeHpPfH57WNoLwIhAKQZJ6Qt1FvtYeGzQnrV9X2CujOY3/DtV7GMn/y4D9vk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20190830205058_1567198408575_0.3099992516317138"},"_hasShrinkwrap":false},"0.0.1-atomist.t29e48p34.typescript-version.master.20190830205100":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-atomist.t29e48p34.typescript-version.master.20190830205100","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"080b7941c7bb0049d2c11aa71bc95540cbb5c9b5","_id":"@atomist/sdm-pack-event-relay@0.0.1-atomist.t29e48p34.typescript-version.master.20190830205100","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-eErjSOH8SrFyQBWoTLd9VJ8YeZLV/wL6H73JLGslIG/tSQQQGMyWB571TSPs6k8QZaWeJ/Hzvtae4ScXzrD69g==","shasum":"35127e329aede99982200b294da4a7e0fb470f62","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-atomist.t29e48p34.typescript-version.master.20190830205100.tgz","fileCount":26,"unpackedSize":175307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaY0DCRA9TVsSAnZWagAA0LwP/1ip/jJboCOQHr800MQG\nbBNZMimFVyiommA1EAiCXkPhmNOyGf/mvOv8it06yNpkSZBhOK9tdVXP3oRP\nKAwJ4NJO+HRJlfWu7x2342yb8ZKuJE2p9j96eELOFOggBX6Y9igrx8Jl7oXc\nTXwV8entLZ5KA3E/eAWHKPInTxWAcQyGyhIGj3voIjRBw6xBJ1/E2hZi9qZx\ncWDKMRKzRXXHF491I5x2A9PJhMBUnHLhPbvXUSZsJ9Tt6jdjwt5EfF0kb2XH\nzgOi3CG0uZhU/jX/RLFaBoCEDkfg2g8Eg12W6ZNYuh3HVQK96zvYT2nQkkKm\nEEAsNBMRfmQoYSeIbdLyPN/x+GMdFSKcye28pLI4x1goCqkI3Qx7Yal1+svL\n3+pRl7yMrfBaFyhIiN6Kngg5rQmBEfaD6LefGEPpC7wSRfhfWwfunAHcRfJl\nPB5arPS7N8uIV2gHwRgjhWzuS5KUfleNFW9/G9YrWeJpkPZsGVEQOaB41WKJ\nY1RQ0aiGdq3UGo5uDvYQauyz2ERi7lLn5tFVlMQIjFtP4da9x6tFMhOe1n4b\nGgwyfkgqEfZA3/JYaAxLffMLyxXs2NtxI/PhvYI48w7qHMF90SajUUIzaSgL\nO5MvRQaU3nTWMCBBnOYh3S5Ei5JIARC4I76nhQvfwxnte+tJs+rH1KZoLNxz\nTPz9\r\n=O18Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGXAbX6vXYTs1WEkeXCLpB5RBxeI71vNjaHAPUjsNh4AiAUbI1VxPQjWYPsXjofn4LzLGIlU/E4bysr4T6tXk1HTg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-atomist.t29e48p34.typescript-version.master.20190830205100_1567198466971_0.9067314118135243"},"_hasShrinkwrap":false},"0.0.1-master.20190831201155":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20190831201155","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"0fae51031d8bae6bf651a7620ca330405d46543e","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20190831201155","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-fc+1Qktdjlb4ummW/9bwFyeGcyUtGGLY9Wo1Kbmd1U8nbRf5KsZbVdAGN0qaoM6RINJdWCxNqGGqlCyCsJsrFg==","shasum":"83da5c66550aecc7eda3bfb3bbbedc5d956a82e4","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20190831201155.tgz","fileCount":26,"unpackedSize":175270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdatUNCRA9TVsSAnZWagAAvccP/0T0EsIpP+PGQxTxLtS0\nn/EdWNJEfIu+4//SdDgZ5uehxBY61LV+wW7mvmr/bC4ImgsDKojJuTIZ+H+H\nrjfzZvJGnaiy8LgECPHCLQJ9+p9T5Y/xvPHmbq1MivutsUzDhP/krStSpna3\nkIT5/IOVIUK1FMvqiyBMUYUlJUYbym1LcARJ8qM7My7RNU9Y2OW2T9JGdhsi\nXuq0doiRt5UEhCifEcnkyE3I0xw+6WE4tp7NeznqBQstebj+cfXySjKNbZR4\n6RbQIXUJLDf5cTH5tMzNXSthZYclgAG8Gi7aCaLFuOmOT7dsdGEjzetRVNAu\npIRrlwi3nqwuNBWhIWMXmkdeIZZRP5YIkZOsX8PLkHlMB8oQhV+Nmz8dGURl\nZgh/0/K8hq65sD8rZkAKq4psUChI0B+KvRoooA7U7YFg1y6ZrUlylnULIft6\n+7OwA7a10g5HZ2aoXHJz8ELdT5IV9ZCeqh5V8bzCroD+zKyvDrN+X53l9SuG\nNwoJiZmNpR+QuSJSQcgbtFVbp7dmAM1l/MZIYPg42vwupnVOwBSI2pb87LoF\nwzVHea0iKHmTUiDupkiP1cw4fpKxNDRPTTE8b0lUrE5A31A7lbt/n2pXWTq0\nYLfsJWZ1Cu8rPW2IJ+/WTZtlJ3LMuh6bxSbY7Ha+8IZwuCxyqvTcLeW/fIkE\nVOOp\r\n=Xmuo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6Dm0U/EIKBN8nmGw87iyAZEBN3vvklUIhIvREsPkXSQIhAKM6qvr1XGUioL5GN4PPuyb1AlIe9e3U5B9ekYXhbsQs"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20190831201155_1567282445307_0.4653826911125274"},"_hasShrinkwrap":false},"0.0.1-redact-utility-function.20190906225318":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-redact-utility-function.20190906225318","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"a18101205eea9f4ce82cae9e7bc14e53bdb919a7","_id":"@atomist/sdm-pack-event-relay@0.0.1-redact-utility-function.20190906225318","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-JHLAlYsssWs9yO1bV/DkwuCV1bTBcxkdZkypeO7e2HwQ2Glc2NLVWd5ZtHv3pUUi/PotVNgTWN1x8hsmTwegHw==","shasum":"4fe328a4198847d5f330ac5930701cc4d6f12d79","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-redact-utility-function.20190906225318.tgz","fileCount":26,"unpackedSize":177491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcuP1CRA9TVsSAnZWagAA3qUQAIlFsxYXhUIALOTL0/On\ntwKm+38NZxEfgp8yXpCMz8dSGBiuxNGha88gdOjwcUjbvVW2+djtOKPnv5CY\nBBtNQbWenCzNb3+DdDRlggsoU5UqgrykhezPvi7LtwNL+N5Yci2eT54khjL+\nZllnpTak6sfLux/i4EtUIMMN0eMfE8E1F5Y0AY90oU9mc3+XeQGIWTDiLRYN\n4Flq53RQ+PJBQJKCfGq+Kw+Iztzqhp+eOsYDeUyuFqejzjOcUqfm7THdkmHg\nl8EK4UrNXxzoHfquUQd1/cIZ7b6P2dVGJDT5CQ1gq+8bSqVE8DnayEfgSVHj\nZ0dERQOnlUeO4TwNOm3grKCO/7o5dvhzU061u8dpKBdvKUDHyyL1BkMPSEt7\n5JMAzvkSOWZKYr5DRV5FZR75DDpE7056HrhlZQ2Z9slsH6LRzRLYpV2dc0z5\nP8tIKaxkKnZrhf+EArDCvRj++AEzaykM1VPQxxuC+yM0spvZmY7ir7vOXf6X\nMucqdp1BrFoVvEnl13rD9/RlbbtOoPZRv7FgfAYNLWgq2oNhPzpqmLM7Ifxz\n5/b8DSMB/H49whAQOrBui/xSMHcT86hT6cFRitol8sBaRwzEsGE18RB31fdb\n4RBYcpB1uI/6iQTEXXS1KPyyoDm2mZL8vveo4ijUaWZVi3l/dFulCEtsJ/O+\n8uAr\r\n=U4+x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgTyUo1HZQeYFu2uM5MRNEztQBQuTsVXh6zEUbhWXRXwIgA68CFYlgJkwYUnise0xrauENwIv+KXjiirtFkfrnjaA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-redact-utility-function.20190906225318_1567810548914_0.9912899914126176"},"_hasShrinkwrap":false},"0.0.1-ipcrm-tests.20190906230408":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-tests.20190906230408","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"7d9a3bcedfa1d8bda339b77ceea664310942afc2","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-tests.20190906230408","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-qh0Jo9STqhbjn8Ne3oIdq/08WkB8B4hZ5GpwgHA4r9TfwVxfdGn8gsP4UZp8g67KTTmqdF6To4Xjcnu74A9ADg==","shasum":"05fd2691e20a14c3a4fe76d7175a5ed79ae9ec70","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-tests.20190906230408.tgz","fileCount":26,"unpackedSize":177479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcuZsCRA9TVsSAnZWagAAngEQAKNqYAkYRWlwo1XuYJON\nSKVfcCYu6bDGHtZIXti12YVxtbUTHbBIKWH6EWHDI6JxwQ+DE+K59IU9gLa3\nih1BeX4ZA7kOXBmSriRtp0ujPxise7r/wnFYse40KbuZlsQtEqo/0i0SA6BJ\nkAlhCNJx5cXkI6+kF5mYBdsFubwhFMeHhX35jMdtr99kMcsYbhhLM9WKCAOR\ngTmnmI7OSfamOmOhcpQ6fJpmiqT43bkk2RXRZOnaAESPp+RaG3HmWhaBG2SE\n6vihvoUIGq2Ub+ZiXcNEYYWz67836y4ZAf2lplh1An0iHP80v20af6+PyApi\nrvLOk+lRgHC6IM4qyqr73N4wJ+AjgNSJZOroitVLmxl+a17Mk6eXqN0adc/C\n3WaMJki9X+9BBhk81pRkiW81ZFvxM02Z4HNrqrYhFkRABbsb47uI5J/YTFZP\nCbuk9LEQ77kOq9UnAz3ONNN7hmUGs23IHZWVT49O0gz2uaWy5pJSiCpu4Q+G\nK5/Lcn91SlvANAvS/9Uehiz027RHuiel8OyR18pUKBPVi3oBSvKMWTV4w5Sf\nXJ2Ruo0dE60L95DCTJlK4/RI73ZojqOWKph9S3T+QjnNXmjdpXzVv2qDoyMd\nNZIEXNRgxg67JTDAlsu5FXRGT7J++Fc08DZBoJ0lJceeRYcYVS8kPj4nY+C4\nf205\r\n=aNiE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGuZNm4sdXba+K8umjqqIEj8V7fuZc80T8zBMfp8oC9AiAFBp56M+41Mn1dpOgKY2x7SJjUZ3ekzJFABmbGNPuiTQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-tests.20190906230408_1567811179532_0.8940786656286219"},"_hasShrinkwrap":false},"0.0.1-master.20190906230746":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20190906230746","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"0ea4b002f7c2f7076f91f9dcc3a11927b74dcd5e","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20190906230746","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ixREpHRR2boyZowcMGTqZlBz8f6QceOPOv5n+9QPhihyBYvga3Mve49uhCwYyTC2/qRfExe2Mp5nbMEvG2TSTw==","shasum":"40e8aef58240be21b5066954e2f4f7a35b2b95a7","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20190906230746.tgz","fileCount":26,"unpackedSize":177474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcuc7CRA9TVsSAnZWagAAJEkP/3hZVikrF1+fWudCPt/9\n4zvF1abBhD2iZPDCZeyZ1QgbWwjvqu/M+mG86hC8+sYDnB3nmHerf4J/99Se\npsc9J4UMfSc7NGW3CEiRVHi7XvcM9mrsMTnWx34xn6YhAVgJH5OeKWmy5jQt\nzhmAgH5HUcvEefW2GpsIYqxTpTnJj2nS/Ak5ylYDzQkLDKdq+qoi8f4srb6W\nXZen4DKCghYWuMjNRsBBFrQ5hGsj3oJZZwi/VJQ+B7gl/DNora/dK4yt8ozy\nPKwS0Gdw0IsrsNCSSJ6Yae15C03MfLgIr10a/QCpfrn+mhrp0dLUEBKM1+Jm\nBLe3p6nlUKyn4yp2dEmsakY7zqT2dMar8JTXZ/Lmb9rgRZv9qqPJn38E/dSn\nfu/2N73IjZk+TsR+ad1KYGU2+1aFTMWavxCv3rPTe7seB6d27vRtSwrWTn0s\nIwpImfNV9KkqNmvKEF6ilK5OgNGHss6x50+b2owjFugm8/VKIJXbkNHBSwyf\n4lwfq9iLlX339ihpSjeMGq530ehlmdQNuUhKDUXEaxYLOsKCyOlA+jcSgBlL\niYxIMRl79ZaZ3zro2Ty227YXUi777C3tfWyKlX+xD4oAGIO/hdGCHtJsMZRZ\ncrDOJyr3qQ8gwLp6uUM3HDPXq6hP1MMyJ9JZaUpCPfZddJETH648NZVD6oqe\n1+Uu\r\n=JwCs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMiZe8f5VOAs1z8Vhe/MkGKKMKRvD6f06FzyYed1bOkAIhAID6FIGQvXipl4f5FmC30qP2alryxky9aARJstzKuPbk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20190906230746_1567811387164_0.37353589119699904"},"_hasShrinkwrap":false},"0.0.1-ipcrm-tests.20190907151516":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-tests.20190907151516","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"2a667b02fcc0152d24c877df6ec91672997d811e","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-tests.20190907151516","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-XYJRc9FDqWp4JmsLRDv6OqK5E5uqnQ7nlFEeE8jUlmEmCZpwkU47XMSF25RqYwWtgyLhw0w/qB/r38dCicxuIQ==","shasum":"bc255491f9f2a4552e7e3c57d32bb478d896df2d","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-tests.20190907151516.tgz","fileCount":26,"unpackedSize":177334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc8odCRA9TVsSAnZWagAAqYUP+wTn6pbMAAV14/G7iQYC\n8Q7TlkcQUiJP2hXRaDDB+KlAUXvCwVhAha5wmXYJBL6HEonIJJwnELG/SPh2\nbWnszJZCghpJpmxl2onQBXHMbR3SbgTvsPDC1ESinWNZxM+C+012o4h6ePxS\nOpgMDy3wNQbul9gyfColdguOMSuLiOUgSkO3RAIBRx+kcEyg4BkNZz96lj0b\nEGOJWcad+ArV0HFnsGBktyEcEER8PoWQzMaXy/o/WonLKlxXdZ2w+UMhjzuO\nCtQeVkGVwpefDsn/X/iDLO7mNk/VjmgNWi2ol0pFaU78Ffz0OWd7XG3fGJlU\nkSiCfljv5ceHbadr75oL9rpNHaqGLEKx1a24pTtSNVNEHsUlAeB28PYClIJ9\naO2bEDqgV1gP/NyoJZTIu4bKMFrLzpq0tLX4OMXwO49Ra3LoNMSsNQowV2xS\nhPXi3XB0e0cEq378x4YYd+FutXIq6ydVqKtkTVq8gtdVSn3Hu1794Zo3X9bB\n5Q4oEwhbgmjvGHfj9EvKAfF2S8sMPvrXBLvWK8UoXiIqatg6O1L8ORKOkp+Y\ngmh+HhlaqKofic25Bfdb00xBOqcxNFDC/Fsj6f69mzBitAfCpCrMNv2jUeCW\nnGv2IhCvL/Aahnlh0o7oYdFoWMznqDwt2befdrrQECRUopgr5TeP/ohu77nH\ntIG+\r\n=0T4Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdJDPriA9koPtDNCmDPl8ppRMyclEUXV8NxPcLyD6OdQIgKTzJCTv5ET9bPvZMni3xHtr8FNR/jz1dHBCRsiOxDZo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-tests.20190907151516_1567869469092_0.8624588924145982"},"_hasShrinkwrap":false},"0.0.1-master.20190907152410":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20190907152410","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190821065818","@atomist/sdm":"^1.6.2-master.20190821222758","@atomist/sdm-core":"^1.6.2-master.20190822002319","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"f4fd1b7472a88f7b6d8850bd357446883e8ff274","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20190907152410","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-0jmYq3v2MFoHp4VOjrA3g35YGJlLW2DFkWiLgVaKL/pcwANuszqWguOlKgKfoLz+EUXqjUdUFVDrmoSZBN63Nw==","shasum":"7ce7d5fb4a0cf0db0e055bc0db27be9f19bde3d3","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20190907152410.tgz","fileCount":26,"unpackedSize":177329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc8xkCRA9TVsSAnZWagAA0WYP/0y19Hva5IgzUTS7jOiB\nB05VbWko6MDZe+WJVkUdUJjN6fP+xO7NHDKzQZNF7ehRej9nzPN2C2SmSAZa\nhzfzHiNfU7L7Q7wy1ga3Cf8Ijv1maF+49Ih93rmSpNtf3fFwIU+F0TDwA6ND\nFiQUsKochs4NEHJAP4wa6qE99lwv82J/ly05TW7jGfeYpGFS3l5dZ4ksSKPW\nhx6ih6shWnF8W1zpR+fiaaYOUo1+pR3OxUBkBqVRbutu0jUvmZYH0xH1pC+g\nKGmFMXfoLV6sv7HHTuw4eyi4ioYiFv+CjfWDDztAqVXPXXWbalflj920+4ff\nNXLs97hzxcWOGkqMOUA9sr/PWcuNelKnLc/gFh42/0U5Fd7AgkM+AhGSXrvh\nIrSOS9cHe/sQZ/QIB1Nl5YnFI3OMoIGLLz0aeLkzlMIYeiQloU8+Va/vDF1l\n9xmCkw/Esu+wvpRv6M+MtKQsPJHJdgmbaInITI3LnjBbJ1v2qCCmPd081/54\n7u4pePo3upeZ5/UMMUdtvHTIYNakLAcOwolIbTrB56vxmmBsNv55lb7jiQk7\ndtmYJZurzOdNbf7U7MLEL3doyPoEdjhQenZD5Wex37/rfVjynoA6olgVK7CY\nUmXKRQfKS0A0YjD1T5uQjYvyLhrrtkAVcp75NyqMpsp1KdOAU5It4gfTkPFl\n1Ei2\r\n=40ou\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH7rlbDGiiEFL3wsopLXHrwa5GRpoZERBPU44U2/FFDnAiEA/669Hy1WnOc76jsE/FZR8b3Q6LdTib+jjAmhGIKk/u0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20190907152410_1567870051542_0.8904304041355215"},"_hasShrinkwrap":false},"0.0.1-atomist.a260p86nh.sdm-deps.master.20190909201345":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-atomist.a260p86nh.sdm-deps.master.20190909201345","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"0cb433c725431efa7fc884e4b761b900de207759","_id":"@atomist/sdm-pack-event-relay@0.0.1-atomist.a260p86nh.sdm-deps.master.20190909201345","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-KYvNcwmN1DA7YGgV9oqNCHluLb1TQeQ1SBeWjLwPNKcjAKrSwYkfjbdyP1NwWFtHLilVBaa3neDqtnI/WvEL/w==","shasum":"ba1e642a6b8aca63e8a878746b3187a22bee6a9c","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-atomist.a260p86nh.sdm-deps.master.20190909201345.tgz","fileCount":26,"unpackedSize":177644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddrPsCRA9TVsSAnZWagAAHloP/ReK6uWRz6lj5OX59cog\nPuQPOuuf3EKwqs1Dp/ziM1TiW+gZqj5edf3asS47ekiQuFgyX0GyI0imiiKk\nxkIKMfBTSfaYW6XNys46W9OCWC+0m1Rb4SXQoC6CRbmy2GodXCu4a+rUbvP2\nxi6FWqUrZ4mYRsBtTf2T9fScw/4vMz5ZvXtqSUHKlCkjncvO1D3ypkd/oKaL\nO1f1r5fdR7tMmTTDkovjoozCMUZUSX71J2k1uEt5p3Lzqj4sEEQYiwsHHH3V\neifWV5HmIb2COQZrJgsJK94Nhd5YTObwmo/hhKN7JTocxRDQ/Rg0p4u9Kg76\nPGwIx1g//QSKJJP2llMtoOeBJGo2DCoa3s5K91dvnw2VSjlu0a6gRrsy0Uoj\nGE+xtjnXw4juuVpeG7VSojS08TyQAiDD5PNJtrtUn0NwGpBusKV9armn0JGq\nTLVePYUuWbbT2PmfxzhhuYpJEIPNKaUX5a2sGlSAJodJiOaTSKv8lRID8NTL\nKDXfkSzGh8PCt/+lAIC7Zt/WjJXZ6oYHcK2sCae4799yW3tWdn6JlWpYPofK\nOUP9Ga4kGn9QflwdXvSjGkwy2kqXP8OFe94Xn3ImUjuRpaJr9b4PlaPHuuEs\nokrZd1bU3EmlD3kJ4rlRuIaV9q0+r2LcMXkCQNwaXqWbf8hvIgVT3lgWNIXF\nVgTx\r\n=/NAR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEzShafZt4ka9bbS/AeqIFKRf25rRyqwj+qbzbwxEFSdAiBJZX/aMjbsJBG8eiwlJ+9O+A6qaDcMZ/Gi2mlilVuVlg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-atomist.a260p86nh.sdm-deps.master.20190909201345_1568060395438_0.03829793505241308"},"_hasShrinkwrap":false},"0.0.1-master.20190910074635":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20190910074635","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"32af9dbae1aef128de563ec1f3c0f02e39e2827a","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20190910074635","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+cH3Z8oCPPSr4sYYHA58xniIk7bbSZL5mtt4dy3AsD4vVslf1IqIdOAu4UyUXMHcapx+sDAfFNT0za55kbB2xw==","shasum":"f10866c5d37bd139d5ce2ad2da50a3a39bfd6bdd","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20190910074635.tgz","fileCount":26,"unpackedSize":164738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd1WPCRA9TVsSAnZWagAA420QAIYFFQgV/vVA1YBj9KME\nf373JI+wt3LuGhwquiZkpjIky6LWL2aHg94GEAdcYoIaEgyHApXio3YR4HFg\nz5EpgMrAaBFI/i1uX6+0qAiU0FYdiCKW/5fqwM2GuWoDK+J1Lez0dx0x+1D1\no7OcoCWbceZ15JIf3Qi6O90GEgRsz+/tk8ogIxK3zdQaNJSBFjCphNsN1YLI\nbJLJrqw4W9aHzyFu0L/2knHR0IH5uALV4zCB8dRBk9xxsqo0zapESkkVk8zD\nIFR2qbfc4XUe94Yxz+LqbkIj4/qNpTJ5AzIMWpxlxfk8j2dUYj7gAitJs7jS\n1Rw7usMvCPuWVmmdrEmyJgQ5jAKKfmKzy6j2kWos7XT4WjhotlUjvIuudq0M\nrha9clkCqhx7g5u+e1x5NK1ZrxDB4oguNmmuYRY10TT0jQcCiHLc9LQYX/hR\nmCGRisVmwrdyT6H6RLXKOND0NuVXHiwS64QpRSJ/8kmBRRcI6a+WC99coG0E\nGhxawbnheDWvVbHvcWK9HQSQ96OjJMMVlsSlYUrjg62LUo5BiGOO1oSTRqf2\nWfwJyjJapcvkDDytNBvRJMexUfJFlDyw8KfLphFE5HDkWW+W1S7kZsQyzQ5X\nxDLYmW1e3TNABZlapM2iS/47nzzZkwMqkhqILhPNDABloUG79Tr+tjgQDR/Y\nDXFQ\r\n=iXsG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6BydUB0xIk0veetqBvfvRxSJxsXX/CJGQGWrdR7YiVgIgbk0i0SdgY8kBvVWSmorHJ8LSKfPqh5H+Xmx4pCYtIa0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20190910074635_1568101775328_0.05793675087726524"},"_hasShrinkwrap":false},"0.0.1-atomist.a260p86nh.typescript-version.master.20190915204932":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-atomist.a260p86nh.typescript-version.master.20190915204932","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"64d73c09b9e17aed26794239ee522c3f028db487","_id":"@atomist/sdm-pack-event-relay@0.0.1-atomist.a260p86nh.typescript-version.master.20190915204932","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-GbQZCj0IsjeagWqVo8/0E5phryZA53YeskH2mYY3butOthxILXpDDV5hjAajtnwZXOYzU5HYlDOs8vXsEiE6yw==","shasum":"a0d6f8d6d050349f1324c999aaef8f7b55bca34b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-atomist.a260p86nh.typescript-version.master.20190915204932.tgz","fileCount":26,"unpackedSize":164775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfqR+CRA9TVsSAnZWagAA02MP/j9Ru7P3M9M1B5hnZAMK\nfkrQVzrhJMzEmDlWfHNjAvTnawYplI8uP9XvWwST4P76LMwOEHjaHNWrPnc3\nJjePKa6Cg02K1JK5ZJI1IcI1fRVgpjAAaBIed/CLNPPxkwuoT3g6on7F6km+\nOXcKwyFAfxfbbbDyPT5ftcTuV+DSTgWpf5P+q6EWZyAngj9y6qek0PrlcvzW\nbS9ElXd7Fj+Maaw/wt0cz2pYrmMpUtWVP/R05suVGl209v8fvAjXbKScHspB\n+vL1+quqiUIUu11HoCopy+wOZCjAd05V1Q2ORMZlDE4kbWftYYPq/TkCIgq/\n5MyyV3nz5LYw8qO0VArP7NitAt5cXS0ArQKh/e2dOjWK1syT/HABNlz0isyz\nhfEBQgoGoNd54vCQkpHSMeZUa0p+TvE0lcuVCAOhhSOOR4S27riaf039KZV7\nFqLXVI58MiysEgxYryZ/+E0F/+WeHXgTqJTGSaZ7L5Bf1JD86fIj6unTtG/e\nwdKgtqQFDQLk+J+PoGBvQ8y/2J+u6vTnni8MPk/DPh3mX5Sw5yFPmebEPkxn\nVVKiK4fPw4u0GRSzFy+ohDr3rybZYsmnLbYUPgWFbbSbx4hQ/yNH+AX5n6BO\nnjOQu+c/H187Y6UfSBf7zKppZIBo1YOTlhvS5OufKbBUeiAoH4l+ArNg0qUd\nV4FO\r\n=XdlN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvfMN8tPv4lKIJgYXW8IsW7frs/3OJA4vVXjWESapzJwIhAMfgZ6ahtaMUlk1LyRQW3gKGcahVh3zPA/EGceNEpKkY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-atomist.a260p86nh.typescript-version.master.20190915204932_1568580733570_0.06420353160675019"},"_hasShrinkwrap":false},"0.0.1-master.20190916025638":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20190916025638","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"01f235b9b290f8cc33d37a0e54a4b423541b702d","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20190916025638","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bEoqsyTASnvFy41m+kgmeiCZgsZW9jHS1aQf/yR02c8L34eNX/JbAYWcHT137tDutzp3N8V9/E//IN1J/o92jw==","shasum":"7c7dc7387a9d90d5eee8e1d29b15cb57cd91c947","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20190916025638.tgz","fileCount":26,"unpackedSize":164738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfvqPCRA9TVsSAnZWagAAO2QP/3TZPglHTwySfBt1XOFD\nVqbHdJoeBgeBtlTK/noaJi6gmMTaBVE9NsTNrj1+Lk6NtRNg+e4V5AFPZ/F+\nKTahedsQ6Ax6LC6Vba60T6p9EJ/mNZSIRslvDJ9LXj7T+7Ho5XfWSXPG65Jh\nc0ZvaryyemrfYtyHZ0/8C/IpHTjyDAhU18dsvaxRAZNxEm0Lu5m2LEEJZ/+r\nBuW8ExfoUQM6b6DOFfi50jA8A/RxDQDhOTQVthoKQHI2y4+Mha5hi1/yN5vC\nJJB1ONPv3IOF46UGCWHjE4fyzysVuekSqhs8SVlMKaHIb93XBtVg2dLQb85g\nocvDuD0SXDiKS7oWK8qAUTqpT29sfhc3CTC9Qs3EtsBpsCtYOb/6UDaNaoAt\nGFTG0CSyAJo58v34PbE7uKcEZRNsHJf2G8xtW2Hp48hGPp/0nh/B8zdZ52nN\n8VA1bEmwxQJ3WKg3YHPV7dgV95PvQo2glgIIelDD66oKpCdfAysVJI1Ts7uN\neBgirZ/d0WKpb4qD/QRshPRirzKdW6uhqab1EwugdTmVqUayWRzdWJFJyXSE\nVbyFrmJnGAh9Gu+hheSE7dZ0v/H4rUFaZ2s4cpdzznzW7QwynREQs0K1GvOy\nNhJr1ZpEaoBzEn8vOKSnXJFUaG37zN1EGOMpsFIyJqp4OSI6OQ1czMUWUzfz\nilEJ\r\n=MaCe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3C6+O2v/i+xYn3Dgl+/M1HKE6twqU3fK5GkxeBg+N2AiBe3CihyItuVsacUyzUB+M/hekJzLRPH8k9BSbHWc++/g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20190916025638_1568602766779_0.786070354264272"},"_hasShrinkwrap":false},"0.0.1-ipcrm-11.20200227022346":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-11.20200227022346","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Disabling Authentication Requirement\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  To\ndisable the authentication requirement set `authRequired` to false in the `eventRelaySupport` options.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"a732874e482fe77922cef7c0f8553d3a7796c1c7","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-11.20200227022346","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-I4GBWs39O6mlOFsLiY3QPq4Zaob/BVjlnZgPX36EDA9uhZxycC80zJiTc4osA41afXkX+ODbRQe6mxVhOTo/UA==","shasum":"0936bd4268a1cfb18c8f5eba3144bfc7ce4d65af","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-11.20200227022346.tgz","fileCount":32,"unpackedSize":169373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVyh/CRA9TVsSAnZWagAAEf0P/RxUxtp/mi2yL68+kVgb\nk8H1ZttCO8UwfrObMs+Dq2YVNFRxGT3MySTB6xtGwGO7uB9Vb3Fw9+G+6S0A\nyJVUtRGcO78Ya2qjTJHf479a+L/HVToMn8+sXgKZufJKT5h60/if0FT4GBnd\nVnDq9895MifPvMVXmIZ2tL1pneQscRzrLjr0YFtGW7Rr+lPTtpGM/N9EXCVg\nRVaIm1vHCqROIaPuf7aBHey3YJYhrMdLqRCRm5koAPInQ+SLiCbfnZ92Pop5\nTjBXEKGpuPjVIPdniLS/jYwAPODZ85hbteUvuqitJ3VZyP0sDKZASe+gYP6V\nUZ3NjdCTxkzTd1qN4D6PogoXqgdnMZe76cJgl0c72Rdnh9AT8LP+4kp3ZaLx\n+HDkB79B39dzR2fNH+CuGqfKMUMSdik1nb11RVHzxO09cFVgL44dBRHvcnoX\nk/uajfQM66BzZBJ62rarBWSdomzgy1tBUkl78neuuj/pR5NM+GBsFI00NbYo\nLKTzehaUemQo/66z/0Uvb2Tg17dtW7jl7MiR2cIW8PdotD5KPvnedwb8PdPb\nHB5WAnRh1ghfi60NtMD0q5LAuqWT8CDvqTfyNM3m+TXDM+v37uUG5cDT0nq1\npzOltzrVk6AVvJoD+mw5k87W6b7d+85ShKjmiop/V9alLrhVm6bH3yzqFKtO\nFI9k\r\n=0FDr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGtlzFLREt6oozDLCEu63kUHPYDxwYP2Fms9mR5Q9aNAiAmmCwT/gsRJ8NrTeDNQ+N4q7si7tiJRNFNJqvG8onbjA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-11.20200227022346_1582770303092_0.7661724540341917"},"_hasShrinkwrap":false},"0.0.1-issue-10.20200227080008":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-issue-10.20200227080008","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"0d5cba5f2a629be71bb382e1b6fbc2807c82d2ec","_id":"@atomist/sdm-pack-event-relay@0.0.1-issue-10.20200227080008","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-kl+jWV0EFUKqp0bHfC42v1W6KgLNZkAbzpm2w7tjeL28jLtN7KNibstMjN6ULRzksL11Rm2XZyD/ulErWkaEBA==","shasum":"edbe187dbf9f76ce9a2171b030706e807e98a782","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-issue-10.20200227080008.tgz","fileCount":26,"unpackedSize":164617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV3dVCRA9TVsSAnZWagAAPnIP/iY9mHfSPb14xux9J+nn\np9+LGsomRGXAoKcHme4U3Wvf4s/gAYIb9qFUJ+0pPuPK/+4ij0+kc/lZNDuj\n3BbV2/eaGa0g6QgqNJrhnftOUv2P4/2gXTT8TkYEoX4cYlCegjcrpD7KWQ1h\nJvcUDROgcT7tX486TLXuKLP2EOSnqsFHa9SEAGbTIbsOMNK4BiqsmmbHrpRn\nej5mlH/79Bz8wmw8qN4maO1uI4jqXrj2tUsDR3+u/F9HRPYYdzq5Q5jUco3r\nDgHIvWubW9FNkjvZgE0Bj15t+JDdGlkdP5xrusHnxN/EhjR0c24l7Q9xQmcl\nz0aeKtz+wwXLlAjmZsRGNGsdH3d7nQxvlkVpHATyYfldgK55sIoeIIknwRV0\nfvaraQdIF5XgGOsOjYA5DHV9TPwdbmSO/wDeYheqNkTMhpCnbWyNvbHxsRMo\n7jiKEX2WozDrWIvWpj6s6w/igB3BGdWkP/XBdyyFLkegSwSO5+gYgg00CtpY\nw+5ah6Ro7HAHxGYkqI55ZAMX7yWg59xHcefLu3DM1kql8bWVJLVjBL6MNwfJ\n+Sw/6mM0MjhpTYzGYeoydCsjbdXICuiv90wqlvV05GJuj9A8KWgE8n2UXFxJ\navRQIWeV9yHBtrxg/Yz81kYRDjnQo1U+r5lrC5Xx5whwbuH6CdTNxNetk9R0\ntAtj\r\n=gSjb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBbQpf8lEMyuyC6mXQ1WT9TiccklwfW5QFofUCYg3+cqAiEA+QRru38VnjgIgzruf7FojPPJMlujtsFBG+0bQARfNec="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-issue-10.20200227080008_1582790484499_0.6805468524800873"},"_hasShrinkwrap":false},"0.0.1-issue-10.20200227080437":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-issue-10.20200227080437","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"6ca782593b6966b2c9849685e543a36aa1c0be53","_id":"@atomist/sdm-pack-event-relay@0.0.1-issue-10.20200227080437","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-JK2jKl2iY1Fkd8sgGfH4oaM3/b1arZw5ZvpJHSOtmK2uY9ql4VvMGRVgWF71dAK0PAy4LkGJswdN9Ct50CTrzQ==","shasum":"20c660c2a1e49589494f2db7a3182912fc96b929","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-issue-10.20200227080437.tgz","fileCount":26,"unpackedSize":164617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV3hcCRA9TVsSAnZWagAAo3AP/Rxrwydf9S00Are0UWVn\nxtKS9CARNCJK2tRonRatrV+r83sPs7E6J3ZJq49sL6PQXYL9RQFyrxrN1j4R\nhAVIDvQi3OyBlodzwaZL1keAXse+GPAdBJ0SYhOEmYZu8bW4AoKlEp1zm38C\ni6rx0ctM/wESIHWzUyOVTfc4zaWMoc8yRI9AU20kCvX1Gip+KS+mS84b3Jcg\nb3AzgbU5KUq4goj5GMYOXoRAAXNf8akJPqC0Tc7R/WW+E69vzg50ozMloIlK\ngnB3JeTiUdI7Cz2ITmEdRoFFYy14+t2AXdUkVNQGLO5XsqQmpRJVhGk/C2gv\nYS9N1Ek1alHDgo81B7VxmXmaoSfGBgM5FeEztqoohmeJdplVidqqibzB6k7A\n4blb7Ua2cpaS6EPgyyPKK/iFnfKztSrsKfORMrWmhSXxMZXE5hED68b9vnHK\ngDVns1FI4Owe1kQPLfZ7bL+WTDk4zX3ELMkmsfddjrDJGkdrk0iRMh3AnS6x\njFXtymQidvD2W3Bl3zKgs05635jqROf69uA91u8aWr3TYNgChmM+Z95cKRsz\njIJJKGp5uV4JZtKUg1XE4YD18iZ73ZdJm0rL4H7BWgYmgEWI5NkIzQedYaep\nCS0EtgB1BUlufOqO/BileA4tcRSiHYzSDApSqWC3pDdtLxuW49e7ad+8TXwu\ndZbP\r\n=o5w5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZtVhtiUKlYfTt8Ge3MUpyb/N6ZyZ8dqPGTHfYvNeT/QIgFe6uhVqMlI9jB0nGdbwwE15+2UXtW9EeXcc/fgKbuFY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-issue-10.20200227080437_1582790748355_0.5966322042846428"},"_hasShrinkwrap":false},"0.0.1-master.20200227123512":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20200227123512","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"a56ffaa1dba4207959e55597ad48ccce581645d2","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20200227123512","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-GE7/rfGk8vaWmF0aYD9yWpIxDixWSpYIY0/nRQsLFKo3B849arwYBoIw2pbAI51HiPefHPZ4RL+ksDDO0JcZYA==","shasum":"309b4d068ab701f4bab19240ba4bcca7f176f06a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20200227123512.tgz","fileCount":26,"unpackedSize":164601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV7fICRA9TVsSAnZWagAA6G4QAIHS54CKrzukeqF4GxMN\nTTmtAQhcNsIZPVMocvyP9MZiGayp+9gNb88BexaNUQ2fwkniusyXpjlplXsd\nnw8vsltIDL3yLm+1xcXqw/I5IWtgiWRvFxujqUONmkUtGhSpvqhrTBosAtgD\nUfI4BAn1zXN7MXamC0Li4CiKWF3n2PcVdPtFJICxbr+oMhClUdefCMpGxxUO\n+DcVX6smknpHUYPZ7DtAh09PI7zRMqkcfn5RSC0K3rgswzySfcqRISRsPuBX\nEa6976JVk7Ifs0ls1pa0pUivY5FlVPItbbZNvBJkZCX4iyzuznHlk3ZaHHcq\nJTyGnS0o+mobVKHUOBjRD5GEL+l5OyOzFyuHG6GhcBWB9qhcPQjzI2dXeFtD\nsnJcMCR3+z3zExxpmeVrMVicDbLSzeQnStfrK+Ras1qsWK3YxH90yrPUPFBc\nHVB/JQgeJHfieANyRtK//LoMLQaVMxVtmEewGVbbWho1xdW111ja37keYlyZ\nhdHzESFUYsFYYeallVzS8Eh8UbE7yu7XajLRyEDLeSC2atIdRRSO2hEPb5m8\nIEbJhbH6RNqYUerW7nhIDps0A2SB91GsA5xad/hBse7R+p4GPz/kB8kmo3T6\nLRGd4wLYN39IzLnphao4BclBRbfFnRsEJpbGYUg0KtFefV9Dej8Dub5eeiMW\nGv8w\r\n=0vdM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFmVqaG7Z/YoizqIhCfmOjEMqnUbzaAIuIWcmGECleQQIgN+XTzC00zU2EW2WCfJGPaSlhp/q6BfAaELiGJgLAIY4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20200227123512_1582806984378_0.19014294344393878"},"_hasShrinkwrap":false},"0.0.1-ipcrm-11.20200227123742":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-11.20200227123742","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Disabling Authentication Requirement\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  To\ndisable the authentication requirement set `authRequired` to false in the `eventRelaySupport` options.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"ebe23bfa9a971aa6440a5bc370ea9695841a9359","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-11.20200227123742","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-TaYanEC1ggnoBcAO1IL3V4+Dw4JBpm+YkFVMAFfPesb52J7IUSQPFHUk53nkwLCi/xYvjob1rj+cMoqxPFKmFA==","shasum":"34a270da60b679632155d6aeefea0047ac7a17bb","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-11.20200227123742.tgz","fileCount":32,"unpackedSize":169254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV7hgCRA9TVsSAnZWagAARNwQAJeWCOmMVZHx3534fBbL\nVq4bhFYFJperMMGvyuwD5OJ0ELdlkZLAq0izsouDqAhslcvuTOYevBmxJ4F1\nhTE9YBhFO4w0el+BrLyamnwzF7/w6l3YKEG7a1Q7W8y5EwcUQHk24Qw++uDQ\nzpae5/717032hnfDhcughHXvky/X5TPp2W5Uq4HkXsHtLyHgev4PquRjnLRs\n/XyDYP74fI2CkbR/g3+UpDmnJThgyQGJ/vl/6IVGsfOm2mW5CPqHCeTmGrMj\nKnvHvUJ0yeXKsvP4z+sCmVhcYj2JuX19WA9ijhk/rs1BPqtkxxJBmMRi/Jnq\nhWsviUnB3cCuIla/zxnXr+PHlZprXevehejsjQ6DsN8DyT1KMqFuDgZF5G+K\n/bVwGBY7TsMByxGAQ7b/FfACXd1brOYIlIDF2jj9iRtL8t8xfiP8qc5PF+f/\nd1I0wcw2AwFM0DZTEXOPC7HR85WgUMStU2aGfOEibNNY9OV7LorVYtVp8dDw\nnYFXErEUYPhVrbEv1eDblr7vPYZm8BSFrqPjT5Hf65+MN3v3ttBFAjnoCHdn\n6b60xzODqAIel1SLsbWd5z3m+aegpdFUUjHCku3tYui/QDPWRAjL04nYsPdS\nmqFrPSnIoHG8nHq/eFEn9BNeTllrQXE6Tsx5XSzQF4m29B7+Yqijb1IfDYL0\ncesP\r\n=UJcJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/OZY3/YzUbe7Q2RbpXJu4NaKtlydTVtKzMc8CiNrBPwIhAKZD2D/x6EuPbt5W96ycHnjOL7Jmda5OUSCiXcQOBKJk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-11.20200227123742_1582807136254_0.07353150130271979"},"_hasShrinkwrap":false},"0.0.1-ipcrm-11.20200227161916":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-11.20200227161916","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport`.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelayer.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"d9de22e8e897e0e2628e9335685bbe52867e8aa4","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-11.20200227161916","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-2cqS0eHOV6Q80HhuIXBKxZIOTw9o2jBMJNVaceDoWnd/YYfakSarLtCzc5RN27dJcRAbD24WAZRmQgDmMGmVhA==","shasum":"a325d4e8dce27dfe0e57855bddc3a12012ee8fcf","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-11.20200227161916.tgz","fileCount":32,"unpackedSize":175924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV+xWCRA9TVsSAnZWagAAb3EP/A9xyNsFn0bCmwdkj4LV\nmfzSkmV6Ccyy+6e5nXbG15E4N4N3EjUUNA+2ypNy16XZfucz0JDpoHXlLjuq\nw/BTzUzsDzkj3V7mwVaz6aSSzyiNn/FcWTL8+Z3cIhvhhfiqBqrpEOwxFDQC\n+2ZaHMmIcRA3BIdQCnzFjxsZHQPSVwQF5Cbb9UPLpukjuWUK5pWBDIw86iEn\ntf0YJyuUZoSp6Exn+dTL9z4DeMJDW9UDHTdZW8i4JN9ThykjI4t+1xjOeEWO\nTZFoGL9BN41kVFvNUQK/RNkCjkPfYtL7aoqLfzufAv1+uwb2KLOqQ++gz/hc\nsdC4O9Ba13EuPZ+CGbGJUKctuuYeXnBc3j0j3Ct0L1bq31Z6Rq+ILU/6Bq/S\nL/NiwlXmM0zes83iUQT6C1gy1oSNNPDLQOTQudIxva8fn/xCy4rjeBpuqVZ9\nkwTqG9x/C/Bw5ZpUjrUmW53gY/p11xpiOct95foKLmK7V9Z4fYY+SVi5GZ0M\nrTtoKo1/kDvgR9wGYfnYdHoaD9+JnGtMHdoAipEkdeSX6/sNZMJzK9+4vPCA\n1bZr2Zs3qCV4tag3aRAt1mUyTevFXPUU6p+m2ti4Pei3KFoL0asbI9DcFlGU\n/+AG5CchJNlADey3ytQ9qzZ+7J5XPndnpGKV9ZDywM6TDZ2p7RJKSmi9BMkC\nk+RE\r\n=SskF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLbthg64YlntuvSzWCrVb7+J5ghZAO9BWsESWYcdJLkgIgM61fyUKNgSLB/SH2x0n43q7DyHjrbSQ8Aq9ZW8vVRnA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-11.20200227161916_1582820437875_0.8597859582531"},"_hasShrinkwrap":false},"0.0.1-master.20200227163419":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20200227163419","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport`.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelayer.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"c24637796bbaee2aff273ea266d641ac04d29286","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20200227163419","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-enKZ1tZDedFHyVFJ2Sl/jK2LiLxNYOxcr+2ZXrHNKoH5jdsIvbFVO/+pIVKow2wILe4G025ShXbrqIaxc6DlNQ==","shasum":"2df3013dca4738ba3ce54bc2bf4ea83f3e6f44b5","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20200227163419.tgz","fileCount":32,"unpackedSize":175908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV+/fCRA9TVsSAnZWagAAt4kP/1CCmI0Fj6F+gnS+Q2kd\nSlbKFJSlhw3f0teizlYsem3JYMBgwXLhFjTipOb9zFWTcnsJps3tD5KnaIPh\n3dThVyLyExjFwxtFpazC4ci8uxcmF8raUiE2cCBg/Xz2uVqF8fsYM7B0XL3Z\n0HPhf0mYmzjZZsnXF8kIzrTgVYniZUE3ArR0AxRofhlxQBo4EYuAOa0K+2kV\nUWqpVgs3/1Tny+Fs70Y94nL3F8j+7648CfK2LX9rTe1jf3svxBaU4J5DNykc\n1m10sDmcF34X8hIR1mZ4uOEAAg4A1luYTqb9sbcJ5hq4UMM2CSR53BdEQ0vU\n42bgnkbgm+b2GnD3Zl59kpRbk0ER77Kd6a6i6qlXDxbrIVEdlLk5DXIxD90Y\nrWmHpxJP6ET9n/j2ktzJUsTsNpjGC2qrXQByU12uuUQk/9kIyP7+jF51mhTq\no3wcxtmW67sXNxyDx0R5tFqUj2/jCE3TnpI1kBim+FVoWxHdHv4c3J/DU8/U\nuiICrj6iv5ApNCYowgnffNcb14CuODtEwpm2WzWYA1t4LIVKMs9A6UqwOeY6\niY0ailGiKWY4yBC/+g6HXYmzOjtvDjO/APRq+4UvsiOCjqs2n4243PuYOkz6\nk+BePcsDdFjmGLrbdstIg4HaKo2Yi5OW4vE/va9CisIjXP23wLLkGimha0r/\neu1R\r\n=nJ2T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGyCbrGJB4j2usEOBvu5cr9Si0YcsWVUAapCpuAJJNVAiBB/kkqMYoF8BQiSJZ0kk0GSNkZnk1Emb+GWAgx6+Y9Ow=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20200227163419_1582821342669_0.6961255483367155"},"_hasShrinkwrap":false},"0.0.1-master.20200227171849":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20200227171849","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport`.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelayer.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"dc3dbee68a0c01212c5d832c89c2de19054ec279","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20200227171849","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bHALqTwU54B/IaCQkymm5zYsmloavyqcb9QPvkCpWv/gsxSGxkMahok5TNvqwaioG3LDsR2NT1x+j0wh4D7V8g==","shasum":"f4a1a815671d45e1f476939acb1e8a0d506f1c61","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20200227171849.tgz","fileCount":32,"unpackedSize":176848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV/pGCRA9TVsSAnZWagAAcuAP/RlissM9TcZ++M0MQAd5\nhDnDTvHAsYWco8sQToosJ/4g2C1DgZ6JJ/R3zCl1NTrlFABIbdTytGXADIiE\nG0T5kzdFQhbI4lceSV32xcE60RZtA91/UuR24MEV++2YMsYT7pMEw1RnazWG\nCRC9pY3zXbm+GAZgGqqU6mL+28kX1p4Sg/1uIYFBQpIZF6hWzVwKDruKTP3r\n1r0j8zkhBSFioJd2qtqpJehCf4bqYFMEJyP2wYIV3m1g0b/wholMmDdI0/+4\nPFWBAGkDTuslb2FNTt7NIOv8SfVEP8TSEWYJVqk6D1yxc2H5NPzpb4pAUf7n\nr0eVoEZjv1692dZ1V7P3NajXr277Dd/CfkoCA+Lpph+JaQfHtzh8B6lsuFij\nCcMmRU61Kyh2TVtzabS+rzwWUbEfXayT+oDpE3lgIY7T7/ps84INZhV/1C2t\n7aVGvObPk3muNW3E0Y7xZ3Xb0yn5WV4zwCEru46pygTNlzDVMdIdBe8qARks\ndaKgx63DPv14nVD4lAQnU6FUpeeCiQsrcZtMGfa5uNHdjVLvsoYjDDTNIu44\n5OjNM3N30ny9B2Ev+7EyUHN5b4xIlYNg7iVX6ns4Rj57A4MV75vqqQEuMpid\nIOHqj0z7Cf2oXaLU7jBYxGx2CziiF9h8zZRL8fzPNqNu99Q/B61FRTdPiG4N\nMg0G\r\n=vHBY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8kPp/wFEy8opN8WhWyofwk4UUtEVEA0h/Wf9T1bNgwAiAlSV62Dg6sfSY7eSQM6LOsoV9Tj+3eWshhzZGDuyv15g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20200227171849_1582824006209_0.39085874069791804"},"_hasShrinkwrap":false},"0.0.1-ipcrm-auth-updates.20200629203849":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-auth-updates.20200629203849","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"66fb44b01284aa632f5f474c84721841e6644a8f","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-auth-updates.20200629203849","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-fJGTiBeiPYDALzlOLJ91Nk1hvxRJM7Scmx4Xwg8BxI6klOakFC0Cnz3vNgJxa61+fS/X2PIfxzSvna199ZktxA==","shasum":"605d9ef3abe24a27e6c0eee40603c15a8f1bf5ea","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-auth-updates.20200629203849.tgz","fileCount":32,"unpackedSize":180964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+lGwCRA9TVsSAnZWagAA94gP/3efHtZMgrv6E6VeHAck\ndUl+HLQQpCsXLcVswZkK6+PjBRFrAtPFZT9Ep4tBWndTfY5us9PmlzwXLkDR\nqGWw3c/MdJDtEfpX22rPUA8WtniXCpGnm2ULvHOvuDoD79p8UYyNBl0nTiEN\nONu6BdRsQPy+zeoMTUTj6H0mIedQ0Qkj2LAX3RYRxcaG3Sao5et3f0HLB8ks\ny/bsDfPNhPH/TNR7CoJaKZRB+pLwCU4EAOYGcypbuo7BDXHTF423GoKayIou\nwmLArrFmrnMJZ7g74g8XOm/G/mdxv3I18kYp7Ylo/BTmxUteIHQl1tqEipDl\nYdBNajY8zL7tQ7hpJ7PYX8j5aEYZiOlsX9mEeWcaImjujf5/qjD6VdvF123X\nL56kjMog8XpEejJVSlaauNWxmteydMmlCHTWYhElpW+ZZKBnh0uMOOnKVIuD\n6tCiIEKEINOSIAK6MJJuVSfYGX5ix5kyagTGPzooYtIFOLa+oFvT/ykL+YyZ\n8vzTTY7aqJtmbyZDw5hkXPijzRZoq/d6QRXgE6niWQBLrsl+FF3I00dGOp32\ngzHkZwq3J8iJOwLdFW2BLZ2NhO6DBAh5Tmokxjy8H81eDqxQrTzaHaeSXR8c\nFEYRXtSBdz1xsRw3SSL8ApEVOZnG7MwsHew8ZDLAadvmdGE+5pUECBwyECQp\ndARJ\r\n=LtbF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0BBDyTi+wxcZXKQjJwlt+VO816Zoylh6uTZ86gnJ0+gIgKudcPdcnmWsOY89ij+1VyepV17f7kSFH3Q5IPJbSQRU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-auth-updates.20200629203849_1593463215500_0.6235726928542906"},"_hasShrinkwrap":false},"0.0.1-ipcrm-auth-updates.20200629204310":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-auth-updates.20200629204310","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"6fff26bf1ece1e4462ca6e4a3d734d3335047b50","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-auth-updates.20200629204310","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-NQ7oZVfXSD8vqB9X1qktwK0q8i1gy4auXG6uifvgYl33usBlOzuPGsynZ0GKqcFETr3eXiTIEa+sFu21cmW0/g==","shasum":"e3b5f688cd712abf29b30a35235a0cf4cb8fd10a","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-auth-updates.20200629204310.tgz","fileCount":32,"unpackedSize":180964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+lKzCRA9TVsSAnZWagAA8gEP/2nIhRFpxjQmTa7u4Kwo\nDF9I7iI2tOdQqqoTnH5Db9h1IbZcMUZNAPDDmo+xzcaS4KUfrhuSnS5h61o0\nxNxOysQSbZUKMbtOvO7o/779Xbqk+yg7FqZ/l6Ey7sfwuuf6xrJtsKxzL3L6\nhP8ft/qYFqu2rEy4h07Z36tmdQ/zdBYxpobgV/RQ3tdXZNTj3fzhU3Gg+8nv\nYHYPXolYSayJk3TOsi0iP0BVuQJEl+LfCuhJKDUIknfaiNisVhj3LenVsDS1\nsrL6RNN1Ih+8LrZaVuhPkv+CJNdV1RvVyx5BN3TQJ4rbpohcEWHUxLJLSdcy\nUJ82S5OEK26BLDMuwg5j8p1TKfhWwpBLK5PxmNhaVO9XC7XoslQwrt/BDs36\nV/BXOt33JH46TU/o2GWq9ktV/EoWn9ULFTicXi7XZmp5xjVT1rRxudmyV5Ah\nNan2DQL45HhRQTKDgBCK3tTu9UifbvUdy+ihWRgAjhfMq/yLD0s46zDi2Nwg\nr30CxV4Dza+vSPUoVTXNKbWV1+9zWkJATX/XzqZVM88ClJ1YG2MtpOHPlfzN\nuwTMWRIgvXXaXUWUyTED2rJs1H+mtX3WjnPavS33DmN5yBOIL8Zsl0IYmibb\ni+plyeIwwTxUmOIMyG8sObH5Rlwic+DyiD2yzZNFeegaiNrGPthONj5kcrN6\nKoUN\r\n=eJJ2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGCEE1R6Gh5DOTp5AJ626hxCoGtR/C6ZCxHsFSRwYtyXAiB8n7eIVEaKWpHJyh/2nfkUstKVHviF7BswC6VF1TSV6g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-auth-updates.20200629204310_1593463475438_0.17585737325378137"},"_hasShrinkwrap":false},"0.0.1-ipcrm-auth-updates.20200630142022":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-auth-updates.20200630142022","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"0336079a2c0322a69aeed2e201ebd3aa87914269","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-auth-updates.20200630142022","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-+UQnyMPsgM1ocfFDo9K+DWayYM40lNoTvonVMwjmd4vvd2YNd9YizpY+7uKN8/vWpKvt0Nta3yARAlkCrtxeDA==","shasum":"13fcfd26dbb72afa37d710598a782b02fea74660","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-auth-updates.20200630142022.tgz","fileCount":32,"unpackedSize":183922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+0qACRA9TVsSAnZWagAAy4oP/3Hw/nLm/4TwvsvNbiQz\nrrKY2BXwbr/wg954hsHpKJXV2QEF/E4cdOnaKZHeNOgQzR9KeMLWNPnULyip\n1hXqcJmTG4OQiDg82nyggxkrwkKUMgHS8BInb7SeVJWMiRGZ2LqJnxIaupnJ\nsOooPOYcGbEDc1ZrPn+E/uMLfs/UdMn/mjKMBt6923zCM73R9CsmEJsvQL8d\nGL+85zCIC7CBLqR1LFNQZhiWwJec5lpYAW3wc3H3/uvicK9BUdpvGm/CtDB1\nVub0LRRTe8c9NmLakxZ5SiekKRsrGyTnGVDSUF4R3JV4cRzvelYk6b8tRi2x\nzE5j7kWkYMKVFtpHVmhnNGGzoLlu0QXpSLK/9/ccx+eVGUm8NqkXDvFSV+3+\nkaH7WctqxqPsZSuw18LubvyOB7jtqSRTZd4+1kID4FbKvc46+4MASR0uvDPg\nX1mEkZdUCQPg1aQuuFAxzTNIupMZqVEBIhUfjyhNvcjNmCRcHbzQV/XeN9B9\nD6D9EBL2qYxO+CwVmEGnD+BtEK1EXyGGuvrXcbWvs7l+Ki20SxxK+DVna8mV\nCjM6j5og6hsLZ8v6r43+v13AUfv8xPSEydFXNtiwkloNtBmi4h1v2AVCiZBc\nLUucoT1aypmKZbeFzBIhZ4QIwgvrFZJxZp8UFSMS0SMnZBYsc6yfiXKQMMpn\nZ+f8\r\n=0+6R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBctsBP7GFA5PHybWk/fmfy1Me6bJkOkXDJq4QDN3PQPAiBPFO8wRbIKIs4MJiwzFhAc5PK6QAsfZHwl2on3leHiyw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-auth-updates.20200630142022_1593526911564_0.1615041079848485"},"_hasShrinkwrap":false},"0.0.1-ipcrm-auth-updates.20200630143141":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-auth-updates.20200630143141","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"f02c59684cfa5f6063ee6f09ac214438930b5a50","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-auth-updates.20200630143141","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-QM9y+GEyREzKMea7DgwbWVS/9PRfQ38ryb9PowXNSQUkPJrzhLTidZXLhGAjXtPcekwUa8kWNz1q68QmAcArTA==","shasum":"2e1dcf7d9c6c88aa3b7fe1c26c762ebdf381419b","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-auth-updates.20200630143141.tgz","fileCount":32,"unpackedSize":183877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+00lCRA9TVsSAnZWagAAIlcP/jK+hmr1kS+2udPvMzo4\n9UwhSuifMLgvYPkHAJTypq8a3VN+M2DUIz3nrvbFgbqDgJFr6veX2sKB/WuR\n5lgLFPdTJFuRnf7jVak1dD2fgsJvYzW+nr5g8OAA8oXjdJLDEcs61O/WEkZe\nwGfuDmCl5T9iAmITGlBHDe5k3/3q5H6u+UJt4J98XwTGWBwF567luHWL6WZ1\nOVxWdLplEDm+GjEavM/DqEFfEzrwktfp+DUcov+T8SekQYR5Wlxfsv+N004y\n/iLoY/LzjRjoD4hjOLZH5KLpRfIffbo4n21lVlW+OgOajxRzGZ9mY4veFlPZ\npVfn/tHThoKOSco2pLM78MCon5b1tmpOTYfcFigZhSPOLvqFQ+aUdb4bi/p8\nS8W8PEXESEMMLZHJTuuJoq9XfPmzHs6LzyTj0d4aKMdCnPCTGQ/7zR9so2Q0\n1CwvcanydOuXdjNGryw/vCNMmppbEXNzbKjZfMyZuBtDtnytM3WrrshBjOBY\nE/Ie0R+wO7077hfuJuSrqzwz7hf0DD7POQdJ+AoMupGXUMfB/13+urPH7vmA\nqfU3EmzR7O45gZ2pz3FAzXz3k8wcH0Eyf2boQFr9pPLH2sZHwMQmfwy9UsQf\nUHj2FrmgDOkELqo2ET8pFUEBHBL80c97lCCZFngnRtEJ9uuZQcZCJVtnTv7P\nVYW/\r\n=2Ims\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJOsgva4MvaM+pijU8hEgr2q/8Duju/EZK2qFgvmpFJAiEAof11ms5U6u+2Q9GjQXBxRvoAwIsgfsVh5cbE1QgxHjE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-auth-updates.20200630143141_1593527589272_0.6610331948769426"},"_hasShrinkwrap":false},"0.0.1-ipcrm-auth-updates.20200702151348":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-ipcrm-auth-updates.20200702151348","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"b67b638ffb136ca657b63d1084a4a17db59dab85","_id":"@atomist/sdm-pack-event-relay@0.0.1-ipcrm-auth-updates.20200702151348","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-8HgQrm+Xhf4/fArdRsFoDg2wy1kA15rnlpEgvam8SSfjladEMuDRIhho6Blyq5NNf4ec1p/Qa5ocRm1Wnp8osA==","shasum":"59fb9701c93c8ef12016f570b30c9c4161a19582","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-ipcrm-auth-updates.20200702151348.tgz","fileCount":32,"unpackedSize":183885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/fn/CRA9TVsSAnZWagAANMcP/A6tSsyzzxwNuWhinCUj\n6zSDDOeHdOKEOT43idf2VHrMwikPzMCcniIfQaxiQ6Nq7bfgsRTnJxMQmCbg\nL3KwFKfFAesvEBEHUyPrbMbEQVRB1y/IesuU3goOoOt3wPZJXVvRglbnfS2/\ny1abNqNI9FCtFIvgotvSi3VGUx6QTvswLJuadote1IGT9G/5HFiviTc8JTJ5\niciLl54svvT+pMSaMF3t/RKnHtsthqxBWGhCcWydBDsfUKH1mbXbDM3d5u5M\nOFnZ6hydQ4ABs2f305I00trVGsH9wxyrWUAYvKQfbMiH+FExo3+wIsbWg5Q/\ntDPF+mj8gQCHyGkH5tLXtptkk5Tfp5cEU7XLg9Tn+R0Wo/KWONEvm49adX/q\nMb8X4Gi9wleJ1pstYcmR8IhXwJTZtGz7Y7Su9AC+wGMy0nWNDmOoH5R1A9O3\nggfetcoGvG8Njb17WTiZ3BvRQWqJcccu7VCc6BrLxOIARFDdTVTztaQNXCKu\nOcMPi3OCt5tn78XmU0qX9XjcaEM7QyEQpk4RUZOD52AlQu5pTj9KZ9T8pnIK\nXtHnPf5wkgYNvCHpR7BrgUcZmPDTxKzlNU/HHGyADe9PEFJJjhvrbj/I+RC5\n1tgYFdbjo+H7qeuO+7U2RZje+cFMbEA+BZepL5YbE8CCHJ9RuMIsCDylEpjJ\nxGVR\r\n=Ltx5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClCtXer6LRHZmnU1hQAWzAb+Trfi/rTYijtV/gjgBoxAiBgGBMaifwkm5p8GDZR0l65H6PxPq3suD6U2/6AngvX4Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-ipcrm-auth-updates.20200702151348_1593702911034_0.21108774261700725"},"_hasShrinkwrap":false},"0.0.1-master.20200703124548":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20200703124548","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"bd6b7c939c5d3fb22bc6b658d62e0dabd34eba6c","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20200703124548","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-SC4TlHReAPpj5VqVHz9cXTmleZyXslJwCu44TeAv4oZtJN4s0T5JzfLthZdg1YoEevenX39+J6Y/qs545vS5RA==","shasum":"bc47906fc0b5c4f7cb1661e819b74df32bbad3c0","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20200703124548.tgz","fileCount":32,"unpackedSize":183539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/ykCCRA9TVsSAnZWagAAMd0P/2xHdtptguWLt6tB3zyu\ncCto9wbTIWm1Xpl20/qMtC7SREF9P9YCxIwJ0OKKr5rLuWxLlyKtbKYYVblB\n7wLfwHGsm7vcP09HJJPFo7AaY0x7bCTdR8JwlivWYWzfUii/5o3qNnNHhXla\nHLiCRQwSUNsMLjw5LiJSjnfvkGBB/FnD67TsgbGk8R90LYQHVnnB0XWieZiP\nezJQ6r82k3ztGP0SJkcsiT6ovr9wYAQSEp0KCXfS5MbhwjsDusZDuCOV35Ek\nazl3H/Mbr2hQpeoicSswzsFFqXN2hNGaXEDV+0W66uf304KcC+XfeLVpFAMw\nuxfkrnu5hqwdx1hx0HkKKXDs5qZXd7MV1wE4VLsUsYhz2vPJLLRJF89Sq3M4\noBwmn5lzzF804iFKCRfWe/IMezKuU8pkKLzZtvr05NmNq70YcCI8bUq0+jnl\nsHWLtc9seAsSEr/NBwPI1stVWitnqy1Nf7oOC58x63V6Fkz32VZRzCLbQWjD\nSNwm6TvkiEim6HpdfPAtgVvBb17UE6ZcB0vJehNPrJyDbsEbHircXWgEtYWQ\nmNp7hv0sj+cCzEGSJek3glWKJMA9+z1/gTxX3bXAeX1YeT0Iaba6YCMMtked\nEZ911x03+vM//S1NoSyrX3VkymZ8PqE4KFPG/xekbPbj63oFmDlyNhgCJe9G\ns8+k\r\n=yGBM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlb8Z62WQpoxvjoPF89pcHmss1+KssodsjW4V2G/oT5AiAingmM2uMmuARH8RI3qz9fqEt2+PIdHaYYNcjF5bQy9g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20200703124548_1593780481917_0.5333166858462906"},"_hasShrinkwrap":false},"0.0.1-master.20200703124747":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20200703124747","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#support`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"bd6b7c939c5d3fb22bc6b658d62e0dabd34eba6c","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20200703124747","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-S4PO7xZ5VyWcl99taXp3wH884c8JxytRGpCSIn38777vRqSJBy8FPpeFMxkIpvKrFApI0i1cWF64HaMkmehoiQ==","shasum":"bcaf810ed8d5d0886bcda0e370615b7f392de744","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20200703124747.tgz","fileCount":32,"unpackedSize":183539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/ylHCRA9TVsSAnZWagAAsGwQAI5x9/4JCK2Mb8o9Y6Ps\neizU+KWGjisJLYXRkWVGhT+iJHmJs4V8RgGbcb+o465Ytmcc8/o/37tkOcPC\nh880HS8RG0VAmcn/nByWq5azqo2aq1q74sO7i81LwmibntDpXiRYhMjSnom3\n525lPMlEbMPYHa9/qP5v2kPrYWZeROzUqRuqtjoTgjYD9Fj7ctWmhqYM2jdF\nPZIvcrrIIZUlKHF6+0ixikMVJ/rQbJPKIS+Vg1KulHDAbVAAocQqAJZiH63Z\nZrQ7lc6dHqPGlL9abNLqFpy5HjgV1Yp2Ar4tGuYIwZeNbVB1tZ25FmyASkli\nNYmbZQfzEhY1sXEqvFxBpmRjUXWtcUDhzl9t3xAb0cUWAePwaCr4TyVHMXch\nTAeTT6i/vqpNNmCAqpinQ/QGuHYsLdme8mbDXH37TJeMzuon4iUIYoIO6eKb\n52ZA4A/fIbXQAjh5YA+TJEe2o93lovxsABl/zUcm6Tm4Y/MIiTbkvE1WlVSh\naxfYT1KVMBuOHJe48sZIvXal4XEqSyFiG9CcUw2QFtWDyjoV4dM8plUtrCIY\nP097wp50CKsKbLzGW82ze4qm80m6mKL2VVvDsT2dgGB91ni9juFSDcLb6II0\nztQ1LnumY61/IPo03syh6m2ru4yY/BU/HAeT8TZRjdby7KZpKfRv2VDKRrhB\nCaSG\r\n=XQmG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDarZwYCxeBm2/+2L6Hv1VmZcQReTHgTNIVEjcSmu1FCAiA+uHssyMEUTKtw2/WaHGyZdj53Wc+Wpm6oDcRqLo/iJA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20200703124747_1593780550925_0.4759249246959727"},"_hasShrinkwrap":false},"0.0.1-master.20210108051801":{"name":"@atomist/sdm-pack-event-relay","version":"0.0.1-master.20210108051801","description":"Atomist SDM Pack Event Relay","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"keywords":["atomist","automation","pack","sdm"],"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/sinon":"^7.0.13","lodash":"^4.17.15","sinon":"^7.4.1"},"peerDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0"},"devDependencies":{"@atomist/automation-client":"^1.9.0","@atomist/sdm":"^1.9.0","@atomist/sdm-core":"^1.9.0","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.3","typescript":"^3.7.4"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:test clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","clean:test":"rimraf .nyc_output coverage","compile":"run-s gql:gen compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","gql:gen":"atm-gql-gen","lint":"tslint --config tslint.json --format verbose --project .","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*.test.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# @atomist/sdm-pack-event-relay\n\nThis extension pack allows an SDM to function as an event relay between event sources and Cortex.  Reasons for doing\nthis include air-gapped services and needing to \"scrub\" data from outbound payloads.\n\nAn example configuration for a relay configuration:\n\n```typescript\n const bitbucketRelay: EventRelayer<BitbucketTestData> = {\n     name: \"bitbucketRelay\",\n     test: payload => !!payload.body.actor && !!payload.body.date && !!payload.body.eventKey,\n     processor: async payload => {\n         (payload.body as any)[\"x-bitbucket-type\"] = payload.headers[\"x-event-key\"];\n         return {body: payload.body, headers: payload.headers};\n     },\n     targetEvent: {\n         eventType: \"public\",\n         eventTarget: sdm.configuration.sdm.git.webhookdest,\n         headers: (ctx, payload) => {\n             payload.headers = addAtomistSignatureHeader(\n                 sdm.configuration.sdm.git.key,\n                 payload.body,\n                 payload.headers as HttpClientOptions[\"headers\"],\n             );\n             return payload.headers as HttpClientOptions[\"headers\"];\n         },\n     },\n };\n\nsdm.addExtensionPacks(\n    eventRelaySupport({\n        eventRelayers: [\n            bitbucketRelay,\n        ],\n    }),\n);\n``` \n\nSee the `EventRelayer` interface for details on creating EventRelayer(s).  For details on the extension pack\nconfiguration, see the `eventRelaySupport` type documentation.\n\n## Authentication and/or Validation\nBy default the event relay pack uses the Atomist API key configured to authorize incoming relay requests.  This key must\nbe supplied in an authorization header (as a bearer token).  However, this is not appropriate for all use cases.  The\nauthentication/validation used by the relay pack is pluggable using the `validation` option on `eventRelaySupport` or by\nadding a `validator` to an `EventRelayer`.  The validator on the `EventRelayer` will be used first, if not present\nthe `validation` global option will be used, if none are supplied the Atomist API key method will be used.\n\nThere are the 3 built-in validators, or you can build your own (see the `Validator` interface).\n\n`nullValidator`: By using this validator you disable auth/verification completely.  All messages are accepted and then\nevaluated to see if any configured relayer knows how to send it.\n\n`apiKeyValidator`: This is the default, and functions as documented above.\n\n`githubHmacValidator`: This validator uses a signature header sent by Github when you supply a secret for your pull\nrequests (x-hub-signature). The validator loads the shared key from your SDM configuration located at\n`sdm.eventRelay.secret` and uses this to validate the signature in the incoming message.  Should the signatures match,\nthe message is accepted and the normal event relay process continues.\n\n## Multiple Workspaces\nWhen using a private event type (which sends messages over the web socket), you need to configure your webhooks to\ninclude the workspace they should post to.  If you do not supply the workspace in the URL (see below), the first\nworkspace from your configuration will automatically be selected and used as the destination workspace for this event.\n\nTo use the first configured (or only) workspace, simply send your webhook payloads to `<host>:2866/relay`.  To send to\na specific workspace send your webhook payloads to `<host>:2866/relay/:workspace`.  \n\n\n> Note: This has no impact on public event types because you provide the full destination URL in the relayer defined\n\n[atomist-doc]: https://docs.atomist.com/ (Atomist Documentation)\n\n## Getting started\n\nSee the [Developer Quick Start][atomist-quick] to jump straight to\ncreating an SDM.\n\n[atomist-quick]: https://docs.atomist.com/quick-start/ (Atomist - Developer Quick Start)\n\n## Contributing\n\nContributions to this project from community members are encouraged\nand appreciated. Please review the [Contributing\nGuidelines](CONTRIBUTING.md) for more information. Also see the\n[Development](#development) section in this document.\n\n## Code of conduct\n\nThis project is governed by the [Code of\nConduct](CODE_OF_CONDUCT.md). You are expected to act in accordance\nwith this code by participating. Please report any unacceptable\nbehavior to code-of-conduct@atomist.com.\n\n## Documentation\n\nPlease see [docs.atomist.com][atomist-doc] for\n[developer][atomist-doc-sdm] documentation.\n\n[atomist-doc-sdm]: https://docs.atomist.com/developer/sdm/ (Atomist Documentation - SDM Developer)\n\n## Connect\n\nFollow [@atomist][atomist-twitter] and [The Composition][atomist-blog]\nblog related to SDM.\n\n[atomist-twitter]: https://twitter.com/atomist (Atomist on Twitter)\n[atomist-blog]: https://the-composition.com/ (The Composition - The Official Atomist Blog)\n\n## Support\n\nGeneral support questions should be discussed in the `#help`\nchannel in the [Atomist community Slack workspace][slack].\n\nIf you find a problem, please create an [issue][].\n\n[issue]: https://github.com/atomist-seeds/sdm-pack/issues\n\n## Development\n\nYou will need to install [Node.js][node] to build and test this\nproject.\n\n[node]: https://nodejs.org/ (Node.js)\n\n### Build and test\n\nInstall dependencies.\n\n```\n$ npm install\n```\n\nUse the `build` package script to compile, test, lint, and build the\ndocumentation.\n\n```\n$ npm run build\n```\n\n### Release\n\nReleases are handled via the [Atomist SDM][atomist-sdm].  Just press\nthe 'Approve' button in the Atomist dashboard or Slack.\n\n[atomist-sdm]: https://github.com/atomist/atomist-sdm (Atomist Software Delivery Machine)\n\n---\n\nCreated by [Atomist][atomist].\nNeed Help?  [Join our Slack workspace][slack].\n\n[atomist]: https://atomist.com/ (Atomist - How Teams Deliver Software)\n[slack]: https://join.atomist.com/ (Atomist Community Slack)\n","readmeFilename":"README.md","gitHead":"007f125cb57689a17de5b9741f67e554a05e19e8","_id":"@atomist/sdm-pack-event-relay@0.0.1-master.20210108051801","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-pDxm79zMQCpw74sWqbDFnX87kURqukUs7Mx1ylqgeIa2cgcFFE2Exr7nY7Hjm5KSWTNQ8gXitSrFxY2puT/Xhg==","shasum":"3fa250318e1013b74492bc9a44ef3bbe90757e25","tarball":"https://registry.npmjs.org/@atomist/sdm-pack-event-relay/-/sdm-pack-event-relay-0.0.1-master.20210108051801.tgz","fileCount":32,"unpackedSize":183538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9+trCRA9TVsSAnZWagAA6JIP/3YRadeVHrRK020NVo3V\nqNPif338sZginFPmvMZwBhmCcsLl+YsGZN5eQhrwR+LW8VBZVNZsfgX4cGfw\nrP+IBWQS4v9hdbYpX1iG+dmqi7JAnR/BuVdTxtX+Glyp5tVr/+9FYIDAqL+r\n1uS1+x5iguR/zy+iND7bVKoB4WagHd61Z8YqZayumAbJMmkULRPz1zxsyG8G\nPOmzYXurfPaFltjShCXfTcAenJi1x2pAktbbc1Mp8fZm4LJJcf3GSnDmfKyD\nocjhvESSZgxBjZLQiU+CVJYFEA3dtcO8KGb0um2i6XyLWBmQk63mqu3vrBWc\nP5shIhp/0akY/KMp/n36QpwBQbRtmgVs5xBLA1W/W8RJKKFNK1KFFkuwKswX\nuJd95UFo2E87+aSlG7sGqWqxoXgCR6iIpgZsU6FQ0ZI39s6dX2xx4WX1UzRH\nJke3od0BxUSTXr8vu/z/EeLwyrTsC71J4QNY/ZB9DMj7wR43ypmCn5ZlcttE\nyXNLIrVtI6uM/qbaix7T9a1B4+CptGWGjUkrNkXdzZVKhNkbZfCId6pDHsTA\nx9+dja25KX5/dvKh4VoJfjnM/r9VqN+8t9dZe1t/TdpvKwoupOYoFxQ+rhtt\noSQvPrKfAPb2Pf0Xu0xFE9AZqAfm3fAAnfMGviKzlU+KUZzX+/NYTvva6U+U\n3dC6\r\n=zmP1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDf05Ydfi2ZdHKde1jQPCaIQEvJxKAThn76T1lBjA/L1AiEAzlvkxNenCNqwDxt+A/0XR2S8L3rJyz3YiOohbvGFJEs="}]},"_npmUser":{"name":"atomist-bot","email":"npm@atomist.com"},"maintainers":[{"name":"atomist-bot","email":"npm@atomist.com"},{"name":"ddatomist","email":"david@atomist.com"},{"name":"cdupuis","email":"cd@atomist.com"},{"name":"slimslenderslacks","email":"slimslenderslacks@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-pack-event-relay_0.0.1-master.20210108051801_1610083178756_0.6832265710856169"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-30T20:53:28.349Z","0.0.1-master.20190830205058":"2019-08-30T20:53:28.730Z","modified":"2023-02-23T17:59:46.078Z","0.0.1-atomist.t29e48p34.typescript-version.master.20190830205100":"2019-08-30T20:54:27.124Z","0.0.1-master.20190831201155":"2019-08-31T20:14:05.442Z","0.0.1-redact-utility-function.20190906225318":"2019-09-06T22:55:49.137Z","0.0.1-ipcrm-tests.20190906230408":"2019-09-06T23:06:19.629Z","0.0.1-master.20190906230746":"2019-09-06T23:09:47.365Z","0.0.1-ipcrm-tests.20190907151516":"2019-09-07T15:17:49.252Z","0.0.1-master.20190907152410":"2019-09-07T15:27:31.698Z","0.0.1-atomist.a260p86nh.sdm-deps.master.20190909201345":"2019-09-09T20:19:55.613Z","0.0.1-master.20190910074635":"2019-09-10T07:49:35.476Z","0.0.1-atomist.a260p86nh.typescript-version.master.20190915204932":"2019-09-15T20:52:13.753Z","0.0.1-master.20190916025638":"2019-09-16T02:59:26.869Z","0.0.1-ipcrm-11.20200227022346":"2020-02-27T02:25:03.358Z","0.0.1-issue-10.20200227080008":"2020-02-27T08:01:24.680Z","0.0.1-issue-10.20200227080437":"2020-02-27T08:05:48.476Z","0.0.1-master.20200227123512":"2020-02-27T12:36:24.520Z","0.0.1-ipcrm-11.20200227123742":"2020-02-27T12:38:56.371Z","0.0.1-ipcrm-11.20200227161916":"2020-02-27T16:20:37.999Z","0.0.1-master.20200227163419":"2020-02-27T16:35:42.841Z","0.0.1-master.20200227171849":"2020-02-27T17:20:06.410Z","0.0.1-ipcrm-auth-updates.20200629203849":"2020-06-29T20:40:15.663Z","0.0.1-ipcrm-auth-updates.20200629204310":"2020-06-29T20:44:35.575Z","0.0.1-ipcrm-auth-updates.20200630142022":"2020-06-30T14:21:51.776Z","0.0.1-ipcrm-auth-updates.20200630143141":"2020-06-30T14:33:09.425Z","0.0.1-ipcrm-auth-updates.20200702151348":"2020-07-02T15:15:11.149Z","0.0.1-master.20200703124548":"2020-07-03T12:48:02.023Z","0.0.1-master.20200703124747":"2020-07-03T12:49:11.109Z","0.0.1-master.20210108051801":"2021-01-08T05:19:38.968Z"},"maintainers":[{"email":"neil.prosser+npmjs@gmail.com","name":"neilprosser"},{"email":"npm@atomist.com","name":"atomist-bot"},{"email":"cd@atomist.com","name":"cdupuis"},{"email":"slimslenderslacks@gmail.com","name":"slimslenderslacks"}],"description":"Atomist SDM Pack Event Relay","homepage":"https://github.com/atomist/sdm-pack-event-relay#readme","keywords":["atomist","automation","pack","sdm"],"repository":{"type":"git","url":"git+https://github.com/atomist/sdm-pack-event-relay.git"},"author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"bugs":{"url":"https://github.com/atomist/sdm-pack-event-relay/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}